From patchwork Wed Jan 3 10:47:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1881905 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=Bah1rQzS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4mdc6VSfz1yQ5 for ; Wed, 3 Jan 2024 21:47:48 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B568187631; Wed, 3 Jan 2024 11:47:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="Bah1rQzS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4FA68871CE; Wed, 3 Jan 2024 11:47:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on070a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::70a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DDEE1870FF for ; Wed, 3 Jan 2024 11:47:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lenYeyqMtDjEqkO95JfOr1GIOUmmvB71RAC/Pmp2b3ldkmI2Aen8u2USU/OKWwV15asvEUJbFjRVBmNXxqilZSvlozcJiQ/Ea91PcVF1pqHd6iu1eduPLqOp5G5Tbh50RO9jIndSGi3KNTxCIHhjW9zs+eRqBCY1dh7kZq1SdPzceOOyiikszRdJCl5WwB77fUzaSoIVC69f/Tc4dY/TPhvBSRvstofrpOlEhXZG31r9TXLhSphHAm5U/O5AkAXWusbUXqGRaeF0CHQ/rPbS+8JVeiDH8h2BIkMz27FTgQ4akQOL9x9MAq1bv9FbQKSfazZ26PzpeHD0mj9R4bnU7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5y3SECXyhGYnvtVHLhsIC0oq/DY+sQjSxK80LUIPtXo=; b=Q6KPHhqXKqwhVD42loJ738CkUBLegNKbHNfWq9W/5BpUZBxA5T3rrnynXSWVm2lJt0aUtV5Ael3Jd0vAkoIDrRtbNronCqrAlzapMry7/SZMuB1PlnWbDHdXV9vAZxxPCB5UcRc3V5foXqixX51WCDNzRHQwfuQWzGnd2/1nOaqyyv7iwvNCBKgvx1HrvZR2Ff1pNi5nfFHTUQWLvjPL01yXU4/sX8/SKqy/m0JckxS4kOmOAMOLFCiH6FlNxoIwWy+/PR/HrjXxON6abc8iPRXVDwMXbxfc45ig6HsTNwp3hroeM70eOjODcZccUFkIQAwj9rD7IGJ4GOJ/fpx/Bw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5y3SECXyhGYnvtVHLhsIC0oq/DY+sQjSxK80LUIPtXo=; b=Bah1rQzSVv8ig2U8VIjK9BmA5HOZyB21847/KK35kXBgZFUvMb3IEbhESOeTPCPc2hlonaLsHny8cO+RW9xKmirZPf69l65QLTP0Te1UjcyZZ7ChwH10ZZ2scjEHk4y94uGZQohYh63KYcto/sXrMo/KXvMWooreDyqB45cwjfI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=prevas.dk; Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) by AS2PR10MB7575.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:546::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 10:47:21 +0000 Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de]) by DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de%7]) with mapi id 15.20.7135.023; Wed, 3 Jan 2024 10:47:21 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Rasmus Villemoes Subject: [PATCH v2 1/8] cmd/mem.c: use memmove in do_mem_cp() Date: Wed, 3 Jan 2024 11:47:03 +0100 Message-Id: <20240103104710.4185383-2-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.40.1.1.g1c60b9335d In-Reply-To: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> References: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> X-ClientProxiedBy: MM0P280CA0069.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::6) To DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB7100:EE_|AS2PR10MB7575:EE_ X-MS-Office365-Filtering-Correlation-Id: 36879681-360e-4823-6cf8-08dc0c495caa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1i3zZ761nb1yylVRC6kJW+2kUaOHYCsoWdNYgCEwczgTkBNClwFsM24yoTbJEEBnhPFLc1Znlgz0c2O+7FmZ3Hmh9mntEBdDKZ7Sph7s94yBixNBciK6+kzVJ53f0pOmFYtJnTkufNB+ONT/o2elJiSGeBJs7STdzz5GwRMMvOb1H8Cx9JNJN2JtCklZv5jYiU/Lu13f3EJ2YTXbMI39P9I4B/sfrJv3peRiq2cBq9fiebKrFJ8dJUO4//FloSjrGsTZf+lrQR10IygXyY6A9EJEGm600+TnnWefU5mwuyCwX+iUhnb4KF0KxJMF1jccPlkcvjWI1kfZTYfpapQGHJhI6sc52Dl1dbHXBlBkSCxAW9cMrLjqGPMR+MUES8TTtaWBF9fwkyKwa2RNrR8clzBltS6uBAos5fpMG2DvG5bxdczNpj+U6nnGvthgL+NzU8RmENk8dWjEPH4XWUEYnK87Kmo2uo1lKrcbnzNL2CgJ767Rk2zEEf+pGHg53GTDB0IocIWqoYgIpux/nXuNiC61thTJwpy6yJivURA0NMUjqxdvlFNRolBmw9ECSXdrA17JPxBpFXMh4HR/p0veJoNo5IHN538vJ9rzK6zZ1aS8+pGsWEjmWsbS8PQoowet X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(346002)(366004)(376002)(396003)(136003)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(1076003)(26005)(2616005)(107886003)(66556008)(83380400001)(38100700002)(66946007)(36756003)(54906003)(6916009)(316002)(66476007)(6486002)(478600001)(86362001)(5660300002)(2906002)(4744005)(44832011)(8676002)(8976002)(8936002)(4326008)(38350700005)(41300700001)(6666004)(6506007)(6512007)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ZfLGTk/cCoVztgAa+8gjmKhAzObiIRxLTT6P76JWWYzHzZuxDIJwfQQyD0H16YWtOAP/YyfIENpsrxLaqjfwkMtQj4JGKMXVm65MekSKH4XoxayDRpFK2htBI0afiqHQ4UiJFln2yx6DcVCQ0656FgAhMxlii+TrttxydnkuC5MkVrWac5pAtmAZTn74ezVbdRwku7rCqgyaQi2q6lTsI5tLaEgz/I92/1qt77VbByVFfanagd9gBA2tLPGxOo5q3RM0nwkzqkLRQ6cibflgMm09vtBjTzShcZGHmCalNPZr94t+E00EPjfFX4h/A38cOJ9IVQkHC48WWIoz7b8uXYdHuQkWu53+06MCFfBG3tGbIR64d5H5lKHFKAFwgT7+iXKoNCJrqfiGyZFwA5ewU/QSwaGODcEz5Wca+z4BkCfYHahRFDVXhcOhFYVyP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J2vxGucxZ9kXwjxsdcEBBekPhaKhuouizrTx/KdIBcMoSTJNa1639taHTOzAllUPDQGBMyHFykxCJ3cXxz1RCvmTcR6ZE7StxG/oh/dWQ== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 36879681-360e-4823-6cf8-08dc0c495caa X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 10:47:20.8254 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BelM1SlbjVurUD4LpM90NefPowh6nQDtvl/+v5jZKvWJHp6wcBtnnFC8XwkqQZwb16vFyA6vBG5wLEd8tu0bDTcuLp6HBtX2yyIMOLHTT/c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR10MB7575 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean There's no 'mv' shell command for handling overlapping src and dst regions, and there's no point introducing one, when we can just make the existing 'cp' command DTRT in all cases. memmove() should at most be a few instructions more then memcpy() (to detect the appropriate direction to do the copy), which is of course completely in the noise with all the string processing that a shell command does. Reviewed-by: Simon Glass Signed-off-by: Rasmus Villemoes --- cmd/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mem.c b/cmd/mem.c index 66c2d36a148..c696b92a274 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -361,7 +361,7 @@ static int do_mem_cp(struct cmd_tbl *cmdtp, int flag, int argc, } #endif - memcpy(dst, src, count * size); + memmove(dst, src, count * size); unmap_sysmem(src); unmap_sysmem(dst); From patchwork Wed Jan 3 10:47:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1881906 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=cQwr/bPW; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4mdq55YZz1yQ5 for ; Wed, 3 Jan 2024 21:47:59 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 236D48766D; Wed, 3 Jan 2024 11:47:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="cQwr/bPW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5367C87120; Wed, 3 Jan 2024 11:47:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on070a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::70a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 11D2087128 for ; Wed, 3 Jan 2024 11:47:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DNMqkTqQMK/3acMXX6Ufg6jpoRlZTacwN0T0PtzxwHDK7rd1nVWYJaCqAB/zAa4ihHos+eLgH7Z/35tUWggrAEB6ERVD/P99UG65TH6M5HDzXWa153WPsp9BHQUlklWxIM6wN7jpnMvljevIlXdO6TnPWDiXu3lEPD14WNRQFPKJQnDyuUZnNcP0bAVjHSAR6ZmZs15FQKao63R13nGdGXFSR0jNBcPN9vorizyFy7hopuOzci+aM/ioCOYy0q9y/GRXV3k+mfLDA+jn7XlcIJ6ZIROmHMmzmszinsKrXY6z6uLP/Pwxo6MmdVStEFwzwXfzFKdqjWVHKegDW1vSpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xOBoR3XbANseumAHrr1xA6/j9QZI3dRzLu/BWBhSnac=; b=F0X6Nga9PXfHTRiteimo6cjLxFdmiO6cDwOtdxpnVmMP5UgzHh79Oo++/qE6o5aqDJaiG8Fa1PoBiMuJuD9bqTgft6AEmRPCkB4UQz8kZYMpnr+7TpSnBRtc9g0ohoOzVgOR7IsN6h8prqigVOQxrsilBh4b8P8mOxnuHlIJVhE9BO8vbnc6FIa2a6mEdSkMMLrIjXTbkBaF9i4+y2MnnwWKoqGXVpalV8pEnQsZfBAVk16As6p6yTzCyqdzx+ezG4opDe0kY54kzX7y5XajXp4aSDD0k8pNm/dZQrgTFxf39XoWXGuuWFiWLL8p2K8/ZTRY8lGS6w63vaZQBtPxXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xOBoR3XbANseumAHrr1xA6/j9QZI3dRzLu/BWBhSnac=; b=cQwr/bPW6Pm1YrF3fUCxUti6whdu7NYMjsOCapSY/Q9f2aIhBdy3jmLA5gw+RusM2hfaZpVXwsK2yDgTovXtKrYW6DHGSG/Dawq85eW7NIGcMVpdNbbpYiqtvvcDCkgs3/fK+bhVeRE/92bg2k3YZB9VCStR7pp8HjhCedkwnJw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=prevas.dk; Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) by AS2PR10MB7575.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:546::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 10:47:21 +0000 Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de]) by DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de%7]) with mapi id 15.20.7135.023; Wed, 3 Jan 2024 10:47:21 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Rasmus Villemoes Subject: [PATCH v2 2/8] doc/usage/cmd/cp.rst: document that overlapping regions are supported Date: Wed, 3 Jan 2024 11:47:04 +0100 Message-Id: <20240103104710.4185383-3-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.40.1.1.g1c60b9335d In-Reply-To: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> References: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> X-ClientProxiedBy: MM0P280CA0069.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::6) To DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB7100:EE_|AS2PR10MB7575:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e4cbffc-b63f-4f0c-7dd5-08dc0c495cfb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: braWWJtYcqHF7LLEWB6B8MuSa0AkLxbsvF30vAzXcgzXnwB8j19o/O2CP+dnjAYdu/tG4Mmj1L1Gi9MgWngYLokua3ilNiNGJeQw3+VTX2R+rAid0Nut7qS016FgGp2Y9pfX5fqgIokXMoqopJxFWLwFgNTgqdJv/YlSssJFERTo325RcWwsT3hbYyZt0Shtq3zspjGsSDbLdB/zb/BCjzQ4/2NR1R/LQmPSQWUJ3BVrm8W4lo/YMyqhUVPnQrn0r7pTVVIBS2utQR+/D73Ti8OQ0bZ+IMW4+urGFeXSZXWEYH4S55n7SBEOcIlGvjYQ4JP804/sdpNjPb1rsmzwMFaG38uG68iJxV7nCdBvNfirpJNhlA3SsAfldgjCFvj/lTp7mmK6zEgtoCy81vdoKkusVMQLwTyt2KaJxhm8SD+1S6n4prlSYx/z2TRl90/LQ7gGP+JARUGbny4BBEYg5NJHnFKqUvRVorDlSZdZQzHXr1t0CMWBStghg7xe+gjBekg1arFHcGmEL3mYlmrA/7yGi3/GjQHUVHbKBzyA+4WcjCwNkqr9Xc36DvSDF22FKj9pwutcdOylqISWp9R286ZfpMy2T/MfHlxOe7cM1aCtfxRYA+2X2hTh6baDYNPR X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(346002)(366004)(376002)(396003)(136003)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(1076003)(26005)(2616005)(107886003)(66556008)(83380400001)(38100700002)(66946007)(36756003)(54906003)(6916009)(316002)(66476007)(6486002)(478600001)(86362001)(5660300002)(2906002)(4744005)(44832011)(8676002)(8976002)(8936002)(4326008)(38350700005)(41300700001)(6666004)(6506007)(6512007)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RIvbKbrywShVDXytOGnMmyGZzCrT+2l5K0xTs13wEj0iaPiKAYj+KrPqYFjR0H1AxmiPAb10kcLbb8w2pKH+DcHC/OXFFjIQ8lwybDdxBTtddaITP2hQ99bpChlfTaUufTkSu+PDYfrcYkVuCZD0ZaJGGQUIMFKx2r+aV0YEa7L5JRGG1d4jz1j4OeSya39KfSe4T8RlkCohY+R29B1XCz/hZDfn6Zjrl8EMfytQs65vKkrR4OHRctCsYzd8F6+fnL3M40A8IBzjLUNkqYAIVL5t+Ukqx6KdYtqy5h5cpuZRq4HYw1jJVZqQAm1vmrtHYp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r9eb2k2iLDYlE8wyFv6uzjEqISrsWYZVnP74lS0GeIpyl/FyMx6nobnGfnzWwCsOpyFR3Yv+cpI+QSpzUjsiKW7RKp1akc/tJEIk97sIjNBWk0fzkB7zTrYfGsKGOh5LPVc7hj2djLuBaDGDVF8BvbGXZP0uZmzQAc6Oxe4gA+WtesF6u6AdmrL1tixX7TUZfrab4TX8qDxATdeoyvcwFLNVzJmI5Sbjdkdug== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 4e4cbffc-b63f-4f0c-7dd5-08dc0c495cfb X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 10:47:21.3570 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LWO6r4BecOfgMB8gAUFwSpV7mKIi4mNDkMkZ7aw5Mt+MD12HLopgodJqRx1Kj070Ns1q/eFdsf5e2V08m9vSCx0qxa8cDvrG8W9rqdA39Qc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR10MB7575 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Now that the cp command is changed to use memmove() internally, update the documentation to explicitly state that overlapping regions are allowed. Signed-off-by: Rasmus Villemoes --- doc/usage/cmd/cp.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/usage/cmd/cp.rst b/doc/usage/cmd/cp.rst index 12a24e19fee..67360e30e41 100644 --- a/doc/usage/cmd/cp.rst +++ b/doc/usage/cmd/cp.rst @@ -19,7 +19,8 @@ Description The cp command is used to copy *count* chunks of memory from the *source* address to the *target* address. If the *target* address points to NOR flash, -the flash is programmed. +the flash is programmed. When the *target* address points at ordinary memory, +memmove() is used, so the two regions may overlap. The number bytes in one chunk is defined by the suffix defaulting to 4 bytes: From patchwork Wed Jan 3 10:47:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1881907 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=H5HQ/TNY; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4mf335nxz1yQ5 for ; Wed, 3 Jan 2024 21:48:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8D2E987509; Wed, 3 Jan 2024 11:47:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="H5HQ/TNY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5DD0787128; Wed, 3 Jan 2024 11:47:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on20700.outbound.protection.outlook.com [IPv6:2a01:111:f403:2606::700]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BCF2687225 for ; Wed, 3 Jan 2024 11:47:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ngh+LvkXmxC9IjDPupWlyhY8A15RDp8dVorU+dMr/DfaF08ynkQ9Cc7crHNdUqolGni47ZmY///GbMz2wdQtStROB/O38XbJr3I7KPrtmOCfAusciNX+WOwcRYJDG4NJSkSFXk1rYR8W/D8E3bxoEbnapBXo7BxtjWd9V9TSEZIlgxHN4ZzLv1hzlv7YQtg7G0+uH/Ku/j0f+JHrWArxjmPU2PkCJ8JpxtiKsExtxqwI2QIJl3cn5tzGOigvZP3Hk5wClK5CTaepmnNTGTu3UQSj0UJAxBtG3pZjLjU49W0Kc49BQlDyIJ2Etn9kcI6begGBjS9mPHT1Pb/pUU3/wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8vWMkYTowogqjnr38HI1uJ3AChZrLP4XQ8lHBBId340=; b=G1SKeJtR8N1CLvZNEY2nDQ2KvEGBpVB+K9666Zu90uEj8tLghs/opDgqev5DwId0LP+rEddJhAn3KjEPok/Pun7b/0oxiRSL9aYIlV8MhNfbA59xkROCgDLtkyEfJ3/YYYJjZLIITx+abSQFxUwWCrgo35sfDeH5/0cbNoxyZrsr7c7zu2EQObF3mdJUppr4KdoYR5emVqWGH3pmU+ul18M3pV+iUdRbOueMMog3HaAWraLbwJjhff3oRMwGMyVoab8ub7P4w75dSSBaQCaDBTtF1JOKF1pT5N24TzVqOlt29Xjdehn2SpQIRRfeUBogiWHBsO/5oyCm6nuANcc0Uw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8vWMkYTowogqjnr38HI1uJ3AChZrLP4XQ8lHBBId340=; b=H5HQ/TNY+9L0jEcjN8KKmMJV3LghieyyOhytA5tyVHBBxpE6RfS0YQrGsXC9lIuCjScdugruc1ccHlnmSly3vLewSZ0wji1BCl3RRykJC2OUgv21B3kgCC7MUip1z+40eLayFyzB6RUZOT+DxiK1Z98Ht1GTA12OcNmdJXHAYxs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=prevas.dk; Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) by AS2PR10MB7575.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:546::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 10:47:22 +0000 Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de]) by DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de%7]) with mapi id 15.20.7135.023; Wed, 3 Jan 2024 10:47:21 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Rasmus Villemoes Subject: [PATCH v2 3/8] cmd/command.c: constify "arg" argument of cmd_get_data_size() Date: Wed, 3 Jan 2024 11:47:05 +0100 Message-Id: <20240103104710.4185383-4-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.40.1.1.g1c60b9335d In-Reply-To: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> References: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> X-ClientProxiedBy: MM0P280CA0069.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::6) To DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB7100:EE_|AS2PR10MB7575:EE_ X-MS-Office365-Filtering-Correlation-Id: d4843492-8a1b-4963-2cdf-08dc0c495d4a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EPT7Fbc3NsmC/PimZUodwqH49MTw6apNil2hEOrXf6Ht1OhpVKWFVZYyjYsDUIiQBfUgNXpMBNE29eF32NcHCqDB69Ud335yZDjjmUW1z6wKS533oQ0CWnaOAFDmaFu+XZeorxYJTtxKQrtOFYV/ZykpX/kgpqBpj2Ej8GFgvFO1eK4fWcfU+dBq++kr1RRA2r/az9lAyevNBUHIoyvZLSlxFO3SM+nuvu5lEUg24d7qF3I9ff6WEQyFlldbXCicIRlAEEPweWb9VKu6XYpuSuiGC6mELzaKhWAsNTH8hpDQ53TYf6KPNv9PN+YxT2ueIev2dXGHpuKGas2+SyqSID9YdloG/KK7+BvT5u78nLM+l79mTWqskaLJP+Ly8Svmngstmsv9F17bLmnZef8mJFgBR5vAstFEG+6q3vFryhzzP7L/jB7obdMPoTsCel5s+F13mgvBQFY+u8pS8Aj05DQ2+CIZQVZrpjE1FP/I3iBcbiZKuf7+It1ZNVnz70V6rwywquUV7fJZFb5gBPI+YjJKdsCfFkWX8Tga7bGpboSOIP1D/rHceY29tQAYY1GGHj4/AASvtogmmAeEhYyNz+2GcH6cOMGYhw4qcBrtY7Xh7pFNjJVxPNtua58UkRHw X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(346002)(366004)(376002)(396003)(136003)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(1076003)(26005)(2616005)(107886003)(66556008)(83380400001)(38100700002)(66946007)(36756003)(54906003)(6916009)(316002)(66476007)(6486002)(478600001)(86362001)(5660300002)(2906002)(44832011)(8676002)(8976002)(8936002)(4326008)(38350700005)(41300700001)(6666004)(6506007)(6512007)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kQn4nV/Ma/Q6bmlTqJWMye2/tzQIrZoA9lSijTsSO0XmHly9XL6tMcxqOTmgzTokR43v8RPRofShPNqv1B1pId6I7HzG7f2sCqxpXoeqA+WvkIP930/2mGG1BQUabtqpieqS1w6G0DpxRiauR9h+7KKG5dy0rV/zzQveusgGgriYteVAQ5jw+GwHZq8JzlLJcvyxIRYr6EuySdJT6CW0AMQdDwh2OUPOqhsQNcxveTOa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2E6Vn3vTkySkIYDqVxAUUU26v1GEDGUjaWsDryBJ/8GWoC9FeJxmT/Z2X5KEsw5huloj4prUpNC+LsNCG277hCzo+2nDTNnUsk/tEHG3PDhkfjx7vmay6RmwwICUMZpfd82r4BHwde5gSl14wKXbCDsqw5plX0jQejj++CxvM6zidq4ZAhEWV3/UW9efHb9yAUjmUPVdKYLt8sAGeYlsi3DY32j4cc0oKvY93nsP6HgoyuM6J4ktICSYWQ5u7sIvLC6+wTbJVacxFv+AXF9QxXjcE8/B/yCS8f1qyGtNSNCLVZitF45i6Qozg== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: d4843492-8a1b-4963-2cdf-08dc0c495d4a X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 10:47:21.8534 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: C2cHVYDB9b6n9pzURlgi2k+Ps2K3ZTbQQ83giOO8rQYY68p9NY+H18UCu3iVp1maxgMiHFK90KvxU3Ff2vj9Cif6ay/nzig7fGt2ixI8eIE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR10MB7575 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This function obviously does not and must not modify "arg". Change the prototype to allow passing an argument of type "const char*" without requiring a cast. Signed-off-by: Rasmus Villemoes --- common/command.c | 2 +- include/command.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/command.c b/common/command.c index 846e16e2ada..474ac98bc38 100644 --- a/common/command.c +++ b/common/command.c @@ -466,7 +466,7 @@ int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp) #endif #ifdef CMD_DATA_SIZE -int cmd_get_data_size(char* arg, int default_size) +int cmd_get_data_size(const char *arg, int default_size) { /* Check for a size specification .b, .w or .l. */ diff --git a/include/command.h b/include/command.h index 6262365e128..6ea678fbbe6 100644 --- a/include/command.h +++ b/include/command.h @@ -153,7 +153,7 @@ int cmd_process_error(struct cmd_tbl *cmdtp, int err); * Return: data size in bytes (1, 2, 4, 8) or CMD_DATA_SIZE_ERR for an invalid * character, or CMD_DATA_SIZE_STR for a string */ -int cmd_get_data_size(char *arg, int default_size); +int cmd_get_data_size(const char *arg, int default_size); #endif #ifdef CONFIG_CMD_BOOTD From patchwork Wed Jan 3 10:47:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1881904 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=EiHuUIXf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4mdT0nZDz1yQ5 for ; Wed, 3 Jan 2024 21:47:41 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 305528747A; Wed, 3 Jan 2024 11:47:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="EiHuUIXf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4C9E086F64; Wed, 3 Jan 2024 11:47:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on20700.outbound.protection.outlook.com [IPv6:2a01:111:f403:2606::700]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A67F1871CE for ; Wed, 3 Jan 2024 11:47:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jYYtuGty6pqN8g1rE9LV0fWdzVKgRTyU/9uM6k+A6khrf577CiV8+Q/tqo0ODNRIfB1B87REmHEVps6yW62W8TVPTI0kTxmktIe+FIRyQrx2xqbiZoStzOeGhzS+5XMFtXvgh4dwbSYk+J397xkN00IBTYslnUVQv2kHVu6F3zQRdLnLRfZnhIfuXTPs2Du610p2r2JClgUc0+8f/WjNT3D/iWgFMmD4XuH1KCXvS+ioiUN9yvTq5I/FWv3D/3xv1N0KywlTFR0T0JK4z18fo8V/N28G0K3bAIyyPBagoXj1pJvI900gz9x2MRFkZX1pQVFpqWSeaDQ6Tm8kQLnMBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZmifkkOYQgl1OmzTWQyPnlip5sc14n7aw4Zbx8JKkZc=; b=BEs/s2xegRNbatGWiSDbzB1ynHtEXGHqSmAgwoYEDBKcBKvSuOC1Dk5AhfYJXPYBYDIhQjwUeqGQzzvxF7r9Th0FB6ZZu96dx1mbG5X0DEJYMHYSKxpczjGHkH4BVAsYpGaDAaGJu3PYcQvR35F9MSHnCssDrbadsvWBqrYH/TKSmQvcL9IqiedjNHWEGOBh9JJcwxa/CWAXLR8enqmB0BtBPd+sfiWx76czp1pjIO8Ed50m44ylkbTStLwhcW9z3lFOjR6LBK5UHTvMk7fbToYW48rpP+Q64N0mynXkhVVVcG7wYS3ahINY+JdNO6VddrXhe70u77/bUE2v8DjWGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZmifkkOYQgl1OmzTWQyPnlip5sc14n7aw4Zbx8JKkZc=; b=EiHuUIXfdab0N+P0HACU7xLch+Thq74e4O+t66Y8E2tadk+R0iLxQTsyitXd+4oBjV+1gkZmNsP2I859xXKzodOwwd8BrSbcWg7ZtjVqtKaAJhf1LFxXkOfjzhr8BIQ8gyjaEMeU3my6hadLPGPeOMGKqIK6sXhmpqHrJXpNWdI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=prevas.dk; Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) by AS2PR10MB7575.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:546::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 10:47:22 +0000 Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de]) by DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de%7]) with mapi id 15.20.7135.023; Wed, 3 Jan 2024 10:47:22 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Rasmus Villemoes Subject: [PATCH v2 4/8] cmd/command.c: relax length check in cmd_get_data_size() Date: Wed, 3 Jan 2024 11:47:06 +0100 Message-Id: <20240103104710.4185383-5-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.40.1.1.g1c60b9335d In-Reply-To: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> References: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> X-ClientProxiedBy: MM0P280CA0069.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::6) To DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB7100:EE_|AS2PR10MB7575:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ee99fb8-5b99-4ce8-db00-08dc0c495d98 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SC9t1K7bQMKhY+F/W7KzDcqC2dzf8XVtEHXO3jHIBiurOU7ieaZcVgtoYj1r4gq+vkA8aNz3llwNvcOPFsifNiE0r+TKya+Ct30KcGb+TBcWF9td8zuByeUwJc+327IoYlomXHHrB9Y4sSFY7E1JLeW2sDYKZyLILsofLCpa0oVQcwffjrG5iLySvNWl6eLpMyPd8DWtP5Rh7ydfOmHhYqKyIsh4xcnO8vvHhhfivrpxj8DnCjHh4MVNH/rFqbxxkCuNgIgev/qHMb8G+PP+r8fA3zVAb5OA97alppnfiNCEXnMvIPI7W5jiamt2YCo0o8OGNWeoI6GIBrkeSI1DFLtd2g/xTM9ceCr7z5Z4pTygDjPUH2bS851WqZn9OuOFrcWElEpZ0xxIEx6v095G33CA9480Hb7icrJuDaCSWCdRtcbOfrmVds7KPrVsrT2XdMA4jtuRGlt+QDXKj4iMTgtYqq07Zp0uxPBo5Zllbjr0TP69RhYM3dqVnJKuWIUukFC5ZBrb8rnM/1B4Y2O5BkQGa+ijofGYtr1gj+vkJ9rDnRvqSLlOZcP474QH5KnRtY7gE+mKU5AkeSjf1ocOFDncNo1rmPVo0OxwvWzTh73L8/po5VkrO0uddXcfBqKA X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(346002)(366004)(376002)(396003)(136003)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(1076003)(26005)(2616005)(107886003)(66556008)(83380400001)(38100700002)(66946007)(36756003)(54906003)(6916009)(316002)(66476007)(6486002)(478600001)(86362001)(5660300002)(2906002)(4744005)(44832011)(8676002)(8976002)(8936002)(4326008)(38350700005)(41300700001)(6666004)(6506007)(6512007)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: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mcH35vLNVPhA1+YHWoLjALai3zgK1pUhZWX8WSps3r1g99hsoLYnWvoMjyJjLXy9WghTeKgvu02UZnfArIwy40+NkU4v5UfK6dPNH3Oi1q4OqQNKVxCxAz86QXZ4bH4Bu+uzysXUfPi/2AkJnO2qjjiMhX8T9mclEUOdiBxNvknTK/qGBj1RQymjR+BDplHWY9bKpHdXY7eEMnxuA7zzzWTekZOJ0Oq6knLec2lB6yWvIg9Gw0dXmUT+6UEJPjx0h6Pn6omezbC9qOCLanSk77jMEaVKV1GGlQN7McxEAWkgJN4NftXO4gl8iPNvVbWoupIw5qQV7wsWSSUySDvCpV5t710EBTh5zqjnVbUEmTwRcSuiRqxXb+yOb/BZ55UaFTIU8aIxWyWv4oIe5L2RdB8mF1yjld0q1y/Ju0wAIvm5IVnDgTPF6Ot3pyowDBbss0Ht8CIQh2ezF/kHTH8fx2Jv6g9FG8ZGefioqjtrtLUsL94flpjs5jXfQLyItYVqVAFRO5lNRqP+86uUtfFz+5dGemBUkdvUDL6zZOh4eZqzABurLHhjyf+NqIyl0sPdIhEzkbpWKw== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 4ee99fb8-5b99-4ce8-db00-08dc0c495d98 X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 10:47:22.3802 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xDUWSafCLZUfYTieCJE5fvkgwlhZ6A6OqkJt6zQwCzxAHh3WDgY8XGcrOHeriMlByG5sgbDlJ8Qmcsgmtip7ZKgAwLkoUO4WuecqOwyMbts= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR10MB7575 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Just check that the length is at least 2. This allows passing strings like ".b", which can be convenient when constructing tests (i.e. parametrizing the suffix used). Signed-off-by: Rasmus Villemoes --- common/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/command.c b/common/command.c index 474ac98bc38..f0354f41644 100644 --- a/common/command.c +++ b/common/command.c @@ -471,7 +471,7 @@ int cmd_get_data_size(const char *arg, int default_size) /* Check for a size specification .b, .w or .l. */ int len = strlen(arg); - if (len > 2 && arg[len-2] == '.') { + if (len >= 2 && arg[len-2] == '.') { switch (arg[len-1]) { case 'b': return 1; From patchwork Wed Jan 3 10:47:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1881908 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=Eqwlpdrh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4mfF1BRwz1yQ5 for ; Wed, 3 Jan 2024 21:48:21 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 05372876C9; Wed, 3 Jan 2024 11:47:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="Eqwlpdrh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B82A58715C; Wed, 3 Jan 2024 11:47:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on20700.outbound.protection.outlook.com [IPv6:2a01:111:f403:2606::700]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D43E6874AC for ; Wed, 3 Jan 2024 11:47:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g6foPo0Ddjqz/I+SXf6P2BkNwQtXKSdWob2nYVP5J8YPr4+bxt9O6lbuDfHZmz8iw6v4InMODl8piZhe57P9mvs2aGLo62F9SzB77qN+nwCIkhVCgxmNLUO0934kAZj384d0I9aCGrYhmI7f/LO48qD0Lbn/q4FQvjhIwg2ejZHIvalkLioSb1ge6Pk2cZptkQRtRuE2suFuzSc9boufrbFoJc/Nr262urWbK4K/i9+Pq2So/2Be2MUB+tPh6ugd4XkUy4J8Em1vUmw0mXhqJS3DF/Wj+FAk1phy9pvD8czqWY5qz1YHQJR3I+nV4jdcEqxh0UbUFBUyzm+AhcTtfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OYI8pkRk24EADLjZQ1+jTy0WS095E9WQXIw3taT/Az8=; b=cS4tacnk5Iv/Z+4Oa/Sd0hDPXbAMdYYc9fTXj7BCVKWEnnup9Jg8aqYODn6U0NRaDeK+Sc92B5BX2NF14Y9P9axN6uYQZGETN6wmFTds2drZiVX0dvTIZeUyT/WlMmAAZbKfg4o/jOExeKWFC7apzbUXlDzQrttYximzTydM2c7D58urrhNMyQVRpBijRDycdSVzHe596wQDzOQ8X3qsQFtM1rSNyC4d1qmt4X/Oqg+92bdhuLYuE/tt9EIGbAIpb9isabR+hzAXPq5Z1yz0YjUtDeK8kRHqY/1OZHiOthEF9r0mK4HRJCPtEF8hrJYYK3p9MGdIrBJ3oKefKL4/gw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OYI8pkRk24EADLjZQ1+jTy0WS095E9WQXIw3taT/Az8=; b=EqwlpdrhSKrx3yjfthmvQI4am/ZSZDD9wQQEjZCfg+ub7nXm9+mTDiegJZ+nxPknh370CYVSdk2PyT6nU3pY+F/605iZl7NmEmpXjX6S0uV1MQX9LQL4qhcljRUj8a8s7Cy1WvUWlThoUGocpiQuctasZUn+EuC4lmB/+cZR7cc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=prevas.dk; Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) by AS2PR10MB7575.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:546::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 10:47:22 +0000 Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de]) by DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de%7]) with mapi id 15.20.7135.023; Wed, 3 Jan 2024 10:47:22 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Rasmus Villemoes Subject: [PATCH v2 5/8] test: add test of "cp" shell command Date: Wed, 3 Jan 2024 11:47:07 +0100 Message-Id: <20240103104710.4185383-6-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.40.1.1.g1c60b9335d In-Reply-To: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> References: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> X-ClientProxiedBy: MM0P280CA0069.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::6) To DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB7100:EE_|AS2PR10MB7575:EE_ X-MS-Office365-Filtering-Correlation-Id: 1eaf2150-9322-4bfb-2739-08dc0c495de5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wLgs8rBzFS8/uTy1DJnXRspN5Rj5XdmI2AM0el1o0nHazFx+atdsfAxCDMbP2chON227hYcUQ5rtphfUKlqlYZweeGV6DclxGDzP5VgQrNZhi2cJAa20KRnD/slojOYvHRzBkCNc9dYLZ2g9LDvQBJUzjVozii9R8j1thNn/h2voJclFmCNwQpsWnjBMUCKPdFNM/06DEp9A4Nuo42Jb7dfxt2cyve5xbxdsFEFVpy7dEN0Dj4sF6TY45cwjLu9FvaVMtjDP8gYtbwaYhd0gQt9OiaDnzRtucJ4pjLk5aEESnrWbGF8ySYX1bhlQs/1pRbHG+0383B4OOtaYF1/9T5stjfNmJimW6ThWjhfEJNtftRfbEVKMglFvXjTIuxj6FyIE6A6eQ7A/0wEEin0bpPtF4zPH4COX4L/9zl4dBUeQpvH1MTK5MHyMVXBpoPucD9FDh7RETY6/QFNIJSiKU0RQDT7SMQ/wmCct5gPL472B+q8DOsKoer7YvnFKemkjNlC1W64E/acyuEQQC2xvPorUVqfzTIV5By8OWK0Alb8/dCnYZHAwF/zu/+g5ebagDIxgwbuBbu67Td6H1NAavlYXYEkQYY6AFYrsb6AjP7t4fVLOE7TsJwtT6ZkSABQT X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(346002)(366004)(376002)(396003)(136003)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(1076003)(26005)(2616005)(107886003)(66556008)(38100700002)(66946007)(36756003)(54906003)(6916009)(316002)(66476007)(6486002)(478600001)(86362001)(5660300002)(2906002)(44832011)(8676002)(8976002)(8936002)(4326008)(38350700005)(41300700001)(6666004)(6506007)(6512007)(52116002); DIR:OUT; SFP:1102; X-MS-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m50J/RhIdEL53M9vDHuqHd2rS5WKhb6VdnL8DT2aO42/NQ2WDRPxTvARDagcWB38sdQPFL86OoX7oV++BFn/jH4+GTZKsQUcJZzpqLKMw5+j452BNCgByCrwDrqELri9p44QLSB9CgJX0f+e+Hadzd5DP1Gi945+LoEfqNDU/dBRsqlBOGk+eMr2hjJLXyf/UxHXE3Jn5JkxFyHnaWR+G+gFwQoCHHIparZcB949a/dGsHXrZI3TPN9jKBCt12hrP3Q3dcz8MXGU87FV2Ri1nIU8Cmq5N5IMrYOIGTeFE0JsBnuM+jxICwiiYGgAabnbY5EM3GnCfbUka8+zw/Bzo703/+G8AkezcfKb8QeBgtwR0GJ3JxibsfToStA1Ng44u444t9j2a7ACcIJxE0wUfASOSQhRjF7sXFYbRXv9P7ut8bL3cfdm/BnAhrRe8v1q+UBCXNrSyw6+gK5Q4IAYBKBvpoExOcWiA+/ZjirE+InMzmt9jpomkQ8wWiFj4bZCc2o/0LDf5QFz7nsOYkPrrQ96EvDya6uRwGg7RVKqZ5gYgG107S+BkpD3NwFzpyypGh9A== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 1eaf2150-9322-4bfb-2739-08dc0c495de5 X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 10:47:22.8173 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: P0Y3v49jLSNrj9JaBbQSaMCFgYIsrpTsesE21oUMcar7DZ8dwcnR4kGRr4Lu1kRgjr000gRovVLW6DoNw3jJWgg1pSezgBHLh1xfqSun9GI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR10MB7575 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Signed-off-by: Rasmus Villemoes --- test/cmd/Makefile | 1 + test/cmd/mem_copy.c | 169 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+) create mode 100644 test/cmd/mem_copy.c diff --git a/test/cmd/Makefile b/test/cmd/Makefile index e296ba1192b..b26b5b1ea85 100644 --- a/test/cmd/Makefile +++ b/test/cmd/Makefile @@ -17,6 +17,7 @@ obj-$(CONFIG_CONSOLE_TRUETYPE) += font.o obj-$(CONFIG_CMD_HISTORY) += history.o obj-$(CONFIG_CMD_LOADM) += loadm.o obj-$(CONFIG_CMD_MEM_SEARCH) += mem_search.o +obj-$(CONFIG_CMD_MEMORY) += mem_copy.o ifdef CONFIG_CMD_PCI obj-$(CONFIG_CMD_PCI_MPS) += pci_mps.o endif diff --git a/test/cmd/mem_copy.c b/test/cmd/mem_copy.c new file mode 100644 index 00000000000..072159b2906 --- /dev/null +++ b/test/cmd/mem_copy.c @@ -0,0 +1,169 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Tests for memory 'cp' command + */ + +#include +#include +#include +#include +#include +#include + +#define BUF_SIZE 256 + +/* Declare a new mem test */ +#define MEM_TEST(_name) UNIT_TEST(_name, 0, mem_test) + +struct param { + int d, s, count; +}; + +static int do_test(struct unit_test_state *uts, + const char *suffix, int d, int s, int count) +{ + const long addr = 0x1000; + u8 shadow[BUF_SIZE]; + u8 *buf; + int i, w, bytes; + + buf = map_sysmem(addr, BUF_SIZE); + + /* Fill with distinct bytes. */ + for (i = 0; i < BUF_SIZE; ++i) + buf[i] = shadow[i] = i; + + /* Parameter sanity checking. */ + w = cmd_get_data_size(suffix, 4); + ut_assert(w == 1 || w == 2 || w == 4 || (MEM_SUPPORT_64BIT_DATA && w == 8)); + + bytes = count * w; + ut_assert(d < BUF_SIZE); + ut_assert(d + bytes <= BUF_SIZE); + ut_assert(s < BUF_SIZE); + ut_assert(s + bytes <= BUF_SIZE); + + /* This is exactly what we expect to happen to "buf" */ + memmove(shadow + d, shadow + s, bytes); + + run_commandf("cp%s 0x%lx 0x%lx 0x%x", suffix, addr + s, addr + d, count); + + ut_asserteq(0, memcmp(buf, shadow, BUF_SIZE)); + + unmap_sysmem(buf); + + return 0; +} + +static int mem_test_cp_b(struct unit_test_state *uts) +{ + static const struct param tests[] = { + { 0, 128, 128 }, + { 128, 0, 128 }, + { 0, 16, 32 }, + { 16, 0, 32 }, + { 60, 100, 100 }, + { 100, 60, 100 }, + { 123, 54, 96 }, + { 54, 123, 96 }, + }; + const struct param *p; + int ret, i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + p = &tests[i]; + ret = do_test(uts, ".b", p->d, p->s, p->count); + if (ret) + return ret; + } + + return 0; +} +MEM_TEST(mem_test_cp_b); + +static int mem_test_cp_w(struct unit_test_state *uts) +{ + static const struct param tests[] = { + { 0, 128, 64 }, + { 128, 0, 64 }, + { 0, 16, 16 }, + { 16, 0, 16 }, + { 60, 100, 50 }, + { 100, 60, 50 }, + { 123, 54, 48 }, + { 54, 123, 48 }, + }; + const struct param *p; + int ret, i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + p = &tests[i]; + ret = do_test(uts, ".w", p->d, p->s, p->count); + if (ret) + return ret; + } + + return 0; +} +MEM_TEST(mem_test_cp_w); + +static int mem_test_cp_l(struct unit_test_state *uts) +{ + static const struct param tests[] = { + { 0, 128, 32 }, + { 128, 0, 32 }, + { 0, 16, 8 }, + { 16, 0, 8 }, + { 60, 100, 25 }, + { 100, 60, 25 }, + { 123, 54, 24 }, + { 54, 123, 24 }, + }; + const struct param *p; + int ret, i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + p = &tests[i]; + ret = do_test(uts, ".l", p->d, p->s, p->count); + if (ret) + return ret; + } + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + p = &tests[i]; + ret = do_test(uts, "", p->d, p->s, p->count); + if (ret) + return ret; + } + + return 0; +} +MEM_TEST(mem_test_cp_l); + +#if MEM_SUPPORT_64BIT_DATA +static int mem_test_cp_q(struct unit_test_state *uts) +{ + static const struct param tests[] = { + { 0, 128, 16 }, + { 128, 0, 16 }, + { 0, 16, 8 }, + { 16, 0, 8 }, + { 60, 100, 15 }, + { 100, 60, 15 }, + { 123, 54, 12 }, + { 54, 123, 12 }, + }; + const struct param *p; + int ret, i; + + for (i = 0; i < ARRAY_SIZE(tests); ++i) { + p = &tests[i]; + ret = do_test(uts, ".q", p->d, p->s, p->count); + if (ret) + return ret; + } + + return 0; +} +MEM_TEST(mem_test_cp_q); +#endif From patchwork Wed Jan 3 10:47:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1881911 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=K4OHSuB/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4mfd3gGxz1yQ5 for ; Wed, 3 Jan 2024 21:48:41 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 067D3875EB; Wed, 3 Jan 2024 11:47:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="K4OHSuB/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4A57987509; Wed, 3 Jan 2024 11:47:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on20700.outbound.protection.outlook.com [IPv6:2a01:111:f403:2606::700]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 78A7986EEC for ; Wed, 3 Jan 2024 11:47:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TNBeEYdrSpikr9HgrsO81P1dZWWeHCbomVfoHqW1K1XCGhaiFVe9O2SLqXOQIHHR2D84awwR4Rpod6CCTOwA67FJ9txevsJpmmGEPuKjbZyfApE6bxWlLed+kOyuFl5nFX7znK5YYm+5cy2CU8qQ84wQ8tokxiI1fohyNaU/AUsXM2Jzw+IbHZG3Oo/yRQGU1HF722E/bRM8KRDB4htZSoN0J+hwT/iS4epxEWqVioWLzDRh6091JkKiUj2E1RnroqrDvTe+P/0LBwB9ect1IOv/hkKxKbVSFn6j9ipQDJINNt8ESXeLYDHQPYCvWzksAm3JeMDQkCbtdhEpQp21HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=axD2qOzY1Le0XMAAXpGbus7X5ltCBA+y43g/kJ3kUGY=; b=LCYGzHOA4ltL94BtrPxkyN+dRZARCxCpktFo1HjQZRotIiD2Z0M2NSjT6R+JGTPkJzQPg6NiCxZIlFYy33P56DokjmVMQMOk+29MKPPIaLASJ/DjZ1KWnHfn6E6BM01Lkyqk/hRWH+UQqVSFV2tJZs/0SBxHfVTRs/jj6H5JnjuI+vlU0KlM+zEC5QanklgLWnPngzdTiBs3hUsS4mmthh5NN4Mg3VNphPiAJUthGGLfjBK79xmscy9S24IkrvL6q39YXOL0KgLO9N4kgivOQOV+jRiYR4oY+LcKR1hOq2+XQnMQGDK8xeFeHnMqonnxsFl7Ua40fa8xmdaFGsGKGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=axD2qOzY1Le0XMAAXpGbus7X5ltCBA+y43g/kJ3kUGY=; b=K4OHSuB/ELqqct9rF7txg3ESu8Z/AkFW3J3sy+g/NL52tP16TROaN29uKTUoqBKb+QD0ACscbC3tZSSAbPNdMdaIq8rZQNfLfDyaoCJnljv8+6bEcXiWZ13rOJxURo2OdXLhCQvU847ra8n4m6fHhr02yQyij81vcYo1bBUVVBE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=prevas.dk; Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) by AS2PR10MB7575.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:546::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 10:47:23 +0000 Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de]) by DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de%7]) with mapi id 15.20.7135.023; Wed, 3 Jan 2024 10:47:23 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Rasmus Villemoes Subject: [PATCH v2 6/8] cmd/mem.c: fix wrong use of ifdef, drop pointless SUPPORT_64BIT_DATA macro Date: Wed, 3 Jan 2024 11:47:08 +0100 Message-Id: <20240103104710.4185383-7-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.40.1.1.g1c60b9335d In-Reply-To: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> References: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> X-ClientProxiedBy: MM0P280CA0069.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::6) To DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB7100:EE_|AS2PR10MB7575:EE_ X-MS-Office365-Filtering-Correlation-Id: 57568def-be3d-4176-e9d6-08dc0c495e27 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: czBZ5jnwJsjbzhQD5R2XyJRGCyIqdULfmykx4lfd5ZdC411tbetlmmligsU8ev5406GXl/F7kt0vAW0vcY+dVaPaLJF+wo5uv1wPTApLWJiMjLsuuWHREhW0Blv9nL5AXYv1xDoKlj0TVHbbfODMGhMekr16HU5sqw8FAMAKdCTZXO9SPB9wVZjGYZ+0LsOZBeDyCpYyN/B76A6RMjmKFu6de/57Pg7R8OfSkkFTffPIp33sKSwjdQCmHmGllmhKKQQrNsu1HXnLqD/tf1G4N+B37ti5GRMvUuX7Gq6t1zIx5j4mwF2fGLhyiuAlpGgU8DLc6ao07vYwBbSKXx9nBe4nyIc3FuXNEHg2mDLZaKY0eUAXUyfjJ4PUzF7eKxiIjDDnkne/WU1fO4zcmRRTJn4LZBqa8JTD4HJ2ATIu0R++qLgKt9knP8TgqqPTTbxkZEtU413c7KxVI8HkgYi625CsDTw5aTsJU4IowG2/NfsBDDebZeny0AOfAi9WpwhncwqaUOiDiOhHuDNks3ZZtxBl+/drG9WLHC2yy8ybgzTgLR0C68JWe39nVDgQPFD5RMEYBGihmSCPRDfB4Vi+sduzTPwxfQAOf6BHrp1ReUk= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(346002)(366004)(376002)(396003)(136003)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(1076003)(26005)(2616005)(107886003)(66556008)(83380400001)(38100700002)(66946007)(36756003)(54906003)(6916009)(316002)(66476007)(6486002)(478600001)(86362001)(5660300002)(2906002)(44832011)(8676002)(8976002)(8936002)(4326008)(38350700005)(41300700001)(6666004)(6506007)(6512007)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkC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kTbnQYk0QiR3dDLln88DSNL6JVUtMuZOjbN/sJLB+H+ogweFLSIPIl+P0moLYqCvIyd/+E1fnMFJ4D7PhBY2EQztpRcTUUKo/jynvaJTez+g7HR8yefSMJdTf/IrZEkPSdAl7Ux/tqHtMpUIIoKs41+To9jKPDflmWSGE80WtWC8wT5n3zrxuqEOG6ZWjpFyhUXnTc9+ofgnczBxzyADLjHuljPoJFCJ61aTYihxVS04dKqryeFNOk87MgIEOc8rzYuLSAjmjdbhENLjU2ijHBP6AFV8AevFo2yspkjdllZlj8QDP0djeV+tneeP3is2frhXEndGO5IlP992OFmisxpameMQWqOaI+eH4189B/2XHKjtEtG9bWo9+g4xokO4BGbPptl8x0UrBmvPjeDpBZ60P4dWIqsINE+3InL5/gk+8dV7o9R0RyaoB3E8r0pz2bRcTBmhiE+07IPdACu0UrbzTAWmeKBOuRgMqvUXz07RI3LQ1/NcZmv1T5BJ/uwbr1CtKPFsm9hqTH1kplCSn8FKvMlihFD5j+eGUAeQ== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 57568def-be3d-4176-e9d6-08dc0c495e27 X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 10:47:23.2912 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NOju4DugCvn1jeitW2YVEyGZ7UbUMf+c87EflO++jrGEM1FSQWYQwQPASvE0BeotAut6HR2Vi8chKTSy9FXT7dDV73MkZm/gTmy3bHG0vzI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR10MB7575 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The macro MEM_SUPPORT_64BIT_DATA is always defined, as either 1 or 0, so using "#ifdef MEM_SUPPORT_64BIT_DATA" doesn't do what one expects. This means that currently all 32 bit targets get compiled with the .q suffix mentioned in the help text, while it doesn't actually work. Use the proper "#if" instead. There's really no point defining another similarly-named macro with exactly the same value, so just use MEM_SUPPORT_64BIT_DATA throughout. Signed-off-by: Rasmus Villemoes --- cmd/mem.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/cmd/mem.c b/cmd/mem.c index c696b92a274..768057e4d3f 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -35,11 +35,9 @@ DECLARE_GLOBAL_DATA_PTR; /* Create a compile-time value */ -#ifdef MEM_SUPPORT_64BIT_DATA -#define SUPPORT_64BIT_DATA 1 +#if MEM_SUPPORT_64BIT_DATA #define HELP_Q ", .q" #else -#define SUPPORT_64BIT_DATA 0 #define HELP_Q "" #endif @@ -131,7 +129,7 @@ static int do_mem_nm(struct cmd_tbl *cmdtp, int flag, int argc, static int do_mem_mw(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - ulong writeval; /* 64-bit if SUPPORT_64BIT_DATA */ + ulong writeval; /* 64-bit if MEM_SUPPORT_64BIT_DATA */ ulong addr, count; int size; void *buf, *start; @@ -152,7 +150,7 @@ static int do_mem_mw(struct cmd_tbl *cmdtp, int flag, int argc, /* Get the value to write. */ - if (SUPPORT_64BIT_DATA) + if (MEM_SUPPORT_64BIT_DATA) writeval = simple_strtoull(argv[2], NULL, 16); else writeval = hextoul(argv[2], NULL); @@ -170,7 +168,7 @@ static int do_mem_mw(struct cmd_tbl *cmdtp, int flag, int argc, while (count-- > 0) { if (size == 4) *((u32 *)buf) = (u32)writeval; - else if (SUPPORT_64BIT_DATA && size == 8) + else if (MEM_SUPPORT_64BIT_DATA && size == 8) *((ulong *)buf) = writeval; else if (size == 2) *((u16 *)buf) = (u16)writeval; @@ -248,7 +246,7 @@ static int do_mem_cmp(struct cmd_tbl *cmdtp, int flag, int argc, int rcode = 0; const char *type; const void *buf1, *buf2, *base; - ulong word1, word2; /* 64-bit if SUPPORT_64BIT_DATA */ + ulong word1, word2; /* 64-bit if MEM_SUPPORT_64BIT_DATA */ if (argc != 4) return CMD_RET_USAGE; @@ -276,7 +274,7 @@ static int do_mem_cmp(struct cmd_tbl *cmdtp, int flag, int argc, if (size == 4) { word1 = *(u32 *)buf1; word2 = *(u32 *)buf2; - } else if (SUPPORT_64BIT_DATA && size == 8) { + } else if (MEM_SUPPORT_64BIT_DATA && size == 8) { word1 = *(ulong *)buf1; word2 = *(ulong *)buf2; } else if (size == 2) { @@ -528,7 +526,7 @@ static int do_mem_loop(struct cmd_tbl *cmdtp, int flag, int argc, { ulong addr, length, i, bytes; int size; - volatile ulong *llp; /* 64-bit if SUPPORT_64BIT_DATA */ + volatile ulong *llp; /* 64-bit if MEM_SUPPORT_64BIT_DATA */ volatile u32 *longp; volatile u16 *shortp; volatile u8 *cp; @@ -559,7 +557,7 @@ static int do_mem_loop(struct cmd_tbl *cmdtp, int flag, int argc, * If we have only one object, just run infinite loops. */ if (length == 1) { - if (SUPPORT_64BIT_DATA && size == 8) { + if (MEM_SUPPORT_64BIT_DATA && size == 8) { llp = (ulong *)buf; for (;;) i = *llp; @@ -579,7 +577,7 @@ static int do_mem_loop(struct cmd_tbl *cmdtp, int flag, int argc, i = *cp; } - if (SUPPORT_64BIT_DATA && size == 8) { + if (MEM_SUPPORT_64BIT_DATA && size == 8) { for (;;) { llp = (ulong *)buf; i = length; @@ -620,8 +618,8 @@ static int do_mem_loopw(struct cmd_tbl *cmdtp, int flag, int argc, { ulong addr, length, i, bytes; int size; - volatile ulong *llp; /* 64-bit if SUPPORT_64BIT_DATA */ - ulong data; /* 64-bit if SUPPORT_64BIT_DATA */ + volatile ulong *llp; /* 64-bit if MEM_SUPPORT_64BIT_DATA */ + ulong data; /* 64-bit if MEM_SUPPORT_64BIT_DATA */ volatile u32 *longp; volatile u16 *shortp; volatile u8 *cp; @@ -646,7 +644,7 @@ static int do_mem_loopw(struct cmd_tbl *cmdtp, int flag, int argc, length = hextoul(argv[2], NULL); /* data to write */ - if (SUPPORT_64BIT_DATA) + if (MEM_SUPPORT_64BIT_DATA) data = simple_strtoull(argv[3], NULL, 16); else data = hextoul(argv[3], NULL); @@ -658,7 +656,7 @@ static int do_mem_loopw(struct cmd_tbl *cmdtp, int flag, int argc, * If we have only one object, just run infinite loops. */ if (length == 1) { - if (SUPPORT_64BIT_DATA && size == 8) { + if (MEM_SUPPORT_64BIT_DATA && size == 8) { llp = (ulong *)buf; for (;;) *llp = data; @@ -678,7 +676,7 @@ static int do_mem_loopw(struct cmd_tbl *cmdtp, int flag, int argc, *cp = data; } - if (SUPPORT_64BIT_DATA && size == 8) { + if (MEM_SUPPORT_64BIT_DATA && size == 8) { for (;;) { llp = (ulong *)buf; i = length; @@ -1151,7 +1149,7 @@ mod_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc, char *const argv[]) { ulong addr; - ulong i; /* 64-bit if SUPPORT_64BIT_DATA */ + ulong i; /* 64-bit if MEM_SUPPORT_64BIT_DATA */ int nbytes, size; void *ptr = NULL; @@ -1186,7 +1184,7 @@ mod_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc, printf("%08lx:", addr); if (size == 4) printf(" %08x", *((u32 *)ptr)); - else if (SUPPORT_64BIT_DATA && size == 8) + else if (MEM_SUPPORT_64BIT_DATA && size == 8) printf(" %0lx", *((ulong *)ptr)); else if (size == 2) printf(" %04x", *((u16 *)ptr)); @@ -1211,7 +1209,7 @@ mod_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc, #endif else { char *endp; - if (SUPPORT_64BIT_DATA) + if (MEM_SUPPORT_64BIT_DATA) i = simple_strtoull(console_buffer, &endp, 16); else i = hextoul(console_buffer, &endp); @@ -1222,7 +1220,7 @@ mod_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc, bootretry_reset_cmd_timeout(); if (size == 4) *((u32 *)ptr) = i; - else if (SUPPORT_64BIT_DATA && size == 8) + else if (MEM_SUPPORT_64BIT_DATA && size == 8) *((ulong *)ptr) = i; else if (size == 2) *((u16 *)ptr) = i; From patchwork Wed Jan 3 10:47:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1881910 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=ATJPQll7; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4mfR2JmRz23dW for ; Wed, 3 Jan 2024 21:48:31 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 79BC6876FF; Wed, 3 Jan 2024 11:47:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="ATJPQll7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3E7C2876A6; Wed, 3 Jan 2024 11:47:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on20701.outbound.protection.outlook.com [IPv6:2a01:111:f403:2606::701]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CB57987509 for ; Wed, 3 Jan 2024 11:47:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lgD2qLSnuO1IAbu7Zvqt+8KEvzTOxJs4VvS0mtVjRI5J23d8tg2gKM6TGA9z8qjmYwrBZBPi8wjlStUF5M1wC9C8jxv4O4euK7BPorU4WAzRwlhicdTeK+DibSCGvPkVaIOQpW9caJ96Xnps3Do7LU1rNK8BnpVXKnQVy0qjalJ/52Wjx7mOUbnJNVln30DB4GPxRGdevZtO8ZmkR5aZCoUw0Tsw5xsX+Nd5qY1WgGvxlvZgXYlqqisHbDdq2rvdpq77krZ0hUomtFgzZNPExlmT+gNa74AfRZMyH07VbgQJyCTQGlyD7vxpBBI/cNk/FTVrVATz/foOa4aW67xX2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OfDoFfSPDEPkVmA0a/RQEnnEr8dW4WDLsjdO56I3VQI=; b=QgM72SMhzeVyuJP0vPD699sFKCEK1VJE/oJzaV0MO36HpTHHGOzycTM49IcUugjE86J/pNrpon7z041IRveJ2DDSf+rnWdeIrKzCXc0TpztEe+kSITpyZ2n/55pPnNwpgLi/Rfga0i1rMFQRVs+y8W+nkh3A9QHia48Aes5xv0fhx0Tf66WlJ6M1z3AiMfOUKZRyoGvhh3nA+nR+AwADu3vfuXhOTw2WTKDUxEBoFb9AUfUsRJY3u8vCqkLahNTVVvyGLbwNQpB+xcpVAaVW27RbBl2MbLv3ctUGOFd19bKlV/T/TP3KNqCi9G5ahSURs93ZWnsBT+mStX5uBvcEBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OfDoFfSPDEPkVmA0a/RQEnnEr8dW4WDLsjdO56I3VQI=; b=ATJPQll7Wa5iu4xDSrKcpC85V13qOTqQSwyj74qwdD3IN3uwyFu0iLrM1bZCxtMXXssBWk5KiBQ1lcu9uORYOiZND4wSFOzjLYu1FaVYZtbuoI9dPNNYSGKgaKtj/lTO20q3ATFBfj/IfuBvwqLjG8Pu4GjHrQb/TDVKkK/mnrM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=prevas.dk; Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) by AS2PR10MB7575.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:546::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 10:47:23 +0000 Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de]) by DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de%7]) with mapi id 15.20.7135.023; Wed, 3 Jan 2024 10:47:23 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Rasmus Villemoes Subject: [PATCH v2 7/8] README: drop mention of MEM_SUPPORT_64BIT_DATA Date: Wed, 3 Jan 2024 11:47:09 +0100 Message-Id: <20240103104710.4185383-8-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.40.1.1.g1c60b9335d In-Reply-To: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> References: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> X-ClientProxiedBy: MM0P280CA0069.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::6) To DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB7100:EE_|AS2PR10MB7575:EE_ X-MS-Office365-Filtering-Correlation-Id: 273d7db7-86ed-4a04-3607-08dc0c495e74 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Dq+zDiRjNeqV5xPgWsZxxF4IsEwHHOH0IJg5pUtQejVnWX/7aQCiGJUElYuAAu9AmxjviqlCPTUPKaSR82bO7RWY+FKzuaRW6u+PzJWE27vVkoeqCZ1WtaZ1v0mb9FkBo+1irNVb2AxwBJKj5aO929oo2MG7bWLW3vCf1EmWLNnK414/1sygtJ1G6BvKkdPYZk7CWSs/rXhfiKKfnrEN71vYWFNwc9292as5DigAik/oZWgIP6QszOTorEvm9x4vfDSmz7/5Ki2brcIxmbAXtJ7Go95vb6is/mfras3f7bKeegKQ00Es7eRZRYF3tpUO6TB6mg/ySYOBxsCjMOiJbecwJCqhPOJIKAYho9Paej36N9j/L6PqEo8LcEBva9GHklnBNUE6/WNgNPErNxuH6DnIKYoRLAlbgcxnvO6Hk0HxK66nOPhQlx3DzytqCk19A0xE+pD+IAfLZcBEIySW3O3JdhOweH4IESQvHJY9VdgYRvtpx7eUTZTTfbcUj4o7Yrf/uBRJXzOhnU9PbYjbCBmJ65G9W9fzmNKAQXo6VqQxOEWaMha5/3bnGHHmHy20hbFFE76XFHTjgapdtU6tiRZGL91hbNxTOImbYwL+drMYO+JclMOyHA3iiqmrjsJN X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(39850400004)(346002)(366004)(376002)(396003)(136003)(230922051799003)(1800799012)(64100799003)(451199024)(186009)(1076003)(26005)(2616005)(107886003)(66556008)(83380400001)(38100700002)(66946007)(36756003)(54906003)(6916009)(316002)(66476007)(6486002)(478600001)(86362001)(5660300002)(2906002)(44832011)(8676002)(8976002)(8936002)(4326008)(38350700005)(41300700001)(6666004)(6506007)(6512007)(52116002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +468i0jQDxVnil/T+t+FDUJj03bB34+3fDqzG/8vlEFFu1WiXJwmQtvvFIwGmuE6txJ2BH9YNp7lCIicThU08M08OmJ3kP8Cu/l7Xm1415r8Fk8sChNfdwA5GZR3ZhRms+s+gtgnSdvVnTB8K3MbYgvVp5/7Mb6dnsAOb6VHp9nFk0JArsinc/rA7xEMea7lubN+wKTOtPrFmtAjrjqykb+vRoTt9O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OrHuuGrF6wgpYa3RIifdXc2IUIe6yNdsRre5MTcatYggSH6cIhVsZ9qXIj4P9oPhia/TjAcJY0IMgsz5MheZevJCUKxKno7hY/xVT20D/9LdgOTer+iqR0CSvA6nbjUuS/NkprOCscxe9lo8mGLio5BFEtT2IcNWpLAlF0NRI4HV3/OvkPndu6Y/gfJ1TvSG2kSYgMh1y3p6xoaNzyYypnqDWqTlobMSTfjjSOk2BK5dTJhYZ56usfzfp5Rj9F+9vy4J2v4a19cPG4yhLfeviB+v53NZmK7LtRgdwH30j0g0zqYYEntu8LWCVQ== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 273d7db7-86ed-4a04-3607-08dc0c495e74 X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 10:47:23.8128 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0Owa51qVSISWfwUeP8MJM8B1SAhktVQ81msGjJ7VmocypyXV5B87dR+OwbH4aXV754l80gFYXuYGzlUlJDwF3EdDwJY2vZzmkV3HkybfOs8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR10MB7575 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The first sentence is half-way true; the macro is always defined, but has the value 0 or 1. The second is outright false. A lot of code guarded by MEM_SUPPORT_64BIT_DATA uses a "ulong" to store values, so if sizeof(long) is not 8, that code would probably compile, but not work at all as expected. It would probably be possible to make all such code explicitly use u64 and thus make it work on 32 bit targets, but until that is done, do not pretend that it's ok to override the automatic value of MEM_SUPPORT_64BIT_DATA. Signed-off-by: Rasmus Villemoes --- README | 3 --- 1 file changed, 3 deletions(-) diff --git a/README b/README index 60c6b8a19db..bc7fb474348 100644 --- a/README +++ b/README @@ -1248,9 +1248,6 @@ typically in board_init_f() and board_init_r(). Configuration Settings: ----------------------- -- MEM_SUPPORT_64BIT_DATA: Defined automatically if compiled as 64-bit. - Optionally it can be defined to support 64-bit memory commands. - - CONFIG_SYS_LONGHELP: Defined when you want long help messages included; undefine this when you're short of memory. From patchwork Wed Jan 3 10:47:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1881912 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.a=rsa-sha256 header.s=selector1 header.b=f9cguvV+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4mfs3NgHz1yQ5 for ; Wed, 3 Jan 2024 21:48:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 79DB08773C; Wed, 3 Jan 2024 11:47:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=prevas.dk header.i=@prevas.dk header.b="f9cguvV+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CF799876A6; Wed, 3 Jan 2024 11:47:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2072a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe16::72a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D2389871CE for ; Wed, 3 Jan 2024 11:47:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=prevas.dk Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rasmus.villemoes@prevas.dk ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CSp3keFgnHZanNOtAYDai6k4/ZW/L/zuBugkv4WHpYXWs2EwXQsH6RXBqWbxqa0ZrPfDaQl5SHDe4VRl57nC/SZ4Pa/Ec0sFFfCNf7Ug/flieLidqLWiMpPs4hh89E5kcWMXJf7gHbNtZ4WhNMiFBj4MU+thvqw482x3ziRVZn3jpuRrJqz/1x6+sjcrKCh282l9Buw5HvEg6E2X/zyrgDWg22Wsu4zffqYctwTbLa9hnZWiuqlhW2rkYuDHrexILJ1eVipRk3qh1kuHCluJPwvk3kCZiq3bF55yycld0nkHE6JoayUKlh8dHSCHnzizqyuqX5ynpFieAwov2JSKGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hSW2tEvxyQsqHf0hHTFKa1MOkAngmwALq/CqtSW1MAI=; b=oZKbetQASIo0ex4cAYMzgE+X7iPk3rSIwGULXLeKo/Won40fyhXh3J1VNHE1N0r2vvlJ4otjwf4ZDlD+QM+SdXesD5K10t8K2NE7oDqLF1KVgkRlkZHRpxH3C+2tdsOBu3C63rWBUiygxarvwVBjMtumwQfoMCeWHo8IdaIGFKrxqKWRHDyaPlYxqZVpc/qn6uTNuCiydaa+j7Xh/r/XYah8SmWvvDCZC9XyQAvAIwH/iXvvqB3zjzGjnbKjj9QBF2KnGo2vzHOuxqvAcQfaEZl/LpYFB3T2XMrdw7+3By2FV/umYK0JDdiQ1gRb1zcnD0uDOTRxwGyvHR3s07UaNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=prevas.dk; dmarc=pass action=none header.from=prevas.dk; dkim=pass header.d=prevas.dk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.dk; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hSW2tEvxyQsqHf0hHTFKa1MOkAngmwALq/CqtSW1MAI=; b=f9cguvV+qUJP76kdj8DPMy2E0lPRmcEUrNtBJB19BpOPrTiUC8JjTbQzSt9ifOJft3CK0ODmDRv0UgPOWMI9nIDxhD3jk8DU3QOO37u+4cRJB2oz7G1U9q/1MXIgJF06Njg2p/XjS+zaldDC8KHPGM5kMWp60reA5wuxHiUMc6M= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=prevas.dk; Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) by VI1PR10MB3743.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:13a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 10:47:24 +0000 Received: from DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de]) by DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM ([fe80::f059:23ad:b039:15de%7]) with mapi id 15.20.7135.023; Wed, 3 Jan 2024 10:47:24 +0000 From: Rasmus Villemoes To: u-boot@lists.denx.de Cc: Tom Rini , Simon Glass , Rasmus Villemoes Subject: [PATCH v2 8/8] doc: drop references to non-existing CONFIG_MEM_SUPPORT_64BIT_DATA Date: Wed, 3 Jan 2024 11:47:10 +0100 Message-Id: <20240103104710.4185383-9-rasmus.villemoes@prevas.dk> X-Mailer: git-send-email 2.40.1.1.g1c60b9335d In-Reply-To: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> References: <20240103104710.4185383-1-rasmus.villemoes@prevas.dk> X-ClientProxiedBy: MM0P280CA0069.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:8::6) To DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR10MB7100:EE_|VI1PR10MB3743:EE_ X-MS-Office365-Filtering-Correlation-Id: dde2a299-6fc2-4731-bb94-08dc0c495ef9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TKo0lrremkg9b6Vgc+VmHq+CyQWzpJVHvi1K0eMqvZiPS/7tkrhxkybiAmXYzi+uiIKq4leDWD7Nx6SVkgaP+Qxb/Nmcj8fa6CK/5B6OUHxk/yZCMolpKkTAWyOCMKFtbECIlvxbNx8dLm1+t12Zvd7dpRHdIrYe3BxFZMD2fQrbKe1O8Nw+BC3co54ua6qSNG6I3RvVKP4uJqQSavnG9oOh3aR8Oe/Pn5fx4SJDLnj5yE5MQjZiVxsqS6Zy9qoB/Vo5S8kRNrVBPCi+2c1eXDnitLabfxXL0q339K7188YbMr2ar6nH1m6n9RYkLugcFVlpJvRCq0GeP4RysxxI6H7UuCuUs292H2f8WQJjDjvqavO3HWB4thaFv+F6ECJBa1MQx52aYyy7jHdgRINVHKUZVNes7dwPpDAjDnvmFrgyde77V5a5x2ijHDZ8/4Mju1aCofovudQ9I2fdLZFAiWYfkXGuhcC7XMQHDP09Cxpn/DCqigZdWTcgleDb6BuoCWzYCBnarBb1eBndHJrFig+FF8soMaA6A7LKCre5Pl/UeBqR95olFKEDWwqX+sMx4xRhQYU+MP9bgmFNRLNNLuRFjHgQmsKbZzOlsSL1Jv+oDSpLESROnkn3TFS17ZOd X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(346002)(396003)(39840400004)(376002)(366004)(136003)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(8936002)(316002)(8676002)(6486002)(8976002)(4326008)(478600001)(66556008)(66946007)(66476007)(6916009)(54906003)(83380400001)(6512007)(6506007)(6666004)(52116002)(2616005)(1076003)(26005)(107886003)(44832011)(2906002)(41300700001)(5660300002)(38350700005)(36756003)(38100700002)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: i41cYhlL1S3nwsyCwWT9cNRIgYHCDX11XyY38l52zOATq0h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hsYO2EYCng3IkALRLp7wlHHuZABA3PFe4sYTk8K2zs7BzLwEKRAE2rZ7CQFsrwISJzdGRD6+nliUj6x0YT8DpdmN42Yk/jnu2PCLBy752CrewyPb4OWjFplgFbyQhbPU0dEHFWeIoWTUqLdjnqcBC8f1XPsLciZrZjzAL/vEAyLtUXSHDnHoolCa/la1KwxPbeRajgFhcUiZLD5MXiOzK6HvvWwxtBYEIX9Sc7YPEl3R85x0YEx2vutbYfHIVXjK+qRCTbEUHFRYyHnlDPHDpd3COLZFwJ2KJPnbmNfKLtx7lpyDttRSpjdSTfJZ5vkEXyNFSOM1wTVRNPFVIPOsLe1u6N/pdN3CbK8yK/jGIi3qQH/MHib9EEsiETsZluZlCW/s3+f6tApKgLFACtd9+EF33X88NsY4XLbzF1Zgtc/4pKakB+DP/XCV0B4yJE9z1OC5A5vAyoF3LnzzDrpg8UO/rbrMkwl+CyJed9h01jUdYK1b9hGg== X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: dde2a299-6fc2-4731-bb94-08dc0c495ef9 X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB7100.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 10:47:24.7172 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cy4OjdTYuDwUt3Zr0NcJaN8ka8Ii/RF8/NODnAeyM+PKNYvl+KbKDP/Iz5JeuYa5RJcbkrnyvUlp6ud51fBlggT4AyG2PnmOSNKI+/9i8HY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB3743 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Such a config option does not exist. Rephrase, and avoid mentioning MEM_SUPPORT_64BIT_DATA, which is an implementation detail. Signed-off-by: Rasmus Villemoes --- doc/usage/cmd/cmp.rst | 2 +- doc/usage/cmd/cp.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/usage/cmd/cmp.rst b/doc/usage/cmd/cmp.rst index 8d196ee5786..66865ebd7ee 100644 --- a/doc/usage/cmd/cmp.rst +++ b/doc/usage/cmd/cmp.rst @@ -96,7 +96,7 @@ Configuration ------------- The cmp command is only available if CONFIG_CMD_MEMORY=y. The cmp.q command is -only available if additionally CONFIG_MEM_SUPPORT_64BIT_DATA=y. +only available on 64-bit targets. Return value ------------ diff --git a/doc/usage/cmd/cp.rst b/doc/usage/cmd/cp.rst index 67360e30e41..bea379ff360 100644 --- a/doc/usage/cmd/cp.rst +++ b/doc/usage/cmd/cp.rst @@ -74,7 +74,7 @@ Configuration ------------- The cp command is available if CONFIG_CMD_MEMORY=y. Support for 64 bit words -(cp.q) depends on CONFIG_MEM_SUPPORT_64BIT_DATA=y. Copying to flash depends on +(cp.q) is only available on 64-bit targets. Copying to flash depends on CONFIG_MTD_NOR_FLASH=y. Return value