From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3B283C4332F for ; Fri, 9 Dec 2022 12:50:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E6D14851F5; Fri, 9 Dec 2022 13:50:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=eswincomputing.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 5B3CA85163; Fri, 9 Dec 2022 10:17:52 +0100 (CET) Received: from zg8tmja5ljk3lje4ms43mwaa.icoremail.net (zg8tmja5ljk3lje4ms43mwaa.icoremail.net [209.97.181.73]) by phobos.denx.de (Postfix) with SMTP id 2939B84FF0 for ; Fri, 9 Dec 2022 10:17:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=eswincomputing.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=liangshenlin@eswincomputing.com Received: from E0005105LT.eswin.cn (unknown [10.12.98.19]) by app1 (Coremail) with SMTP id EwgMCgCXXIU3_ZJjTMkXAA--.21641S5; Fri, 09 Dec 2022 17:17:45 +0800 (CST) From: Shenlin Liang To: u-boot@lists.denx.de Cc: zhangdongdong@eswincomputing.com, jinyanjiang@eswincomputing.com, zhengyu@eswincomputing.com, zhuwenjun@eswincomputing.com, Shenlin Liang Subject: [PATCH 1/1] cmd: change the return value when argc error Date: Fri, 9 Dec 2022 17:17:43 +0800 Message-Id: <20221209091743.2424-2-liangshenlin@eswincomputing.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20221209091743.2424-1-liangshenlin@eswincomputing.com> References: <20221209091743.2424-1-liangshenlin@eswincomputing.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: EwgMCgCXXIU3_ZJjTMkXAA--.21641S5 X-Coremail-Antispam: 1UD129KBjvdXoW7Jr1Dtw1rJryktr4UWFyxAFb_yoW3CrX_Ca 18Z39Iy3s0gF12yrs0kayUCrW3t34jk34rKFs5ZwnxA34jkFn0yryDtrZrAF17WF12q3y7 uFyDCFy3tr90yjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbfAFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUGwA2048vs2IY02 0Ec7CjxVAFwI0_JFI_Gr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWxJr0_GcWl84 ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I2 62IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcV AFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG 0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1lc2xSY4AK6svPMxAIw28IcxkI7V AKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCj r7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6x IIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAI w20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x 0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUbzBT7UUUUU== X-CM-SenderInfo: xold0whvkh0z1lq6v25zlqu0xpsx3x1qjou0bp/ X-Mailman-Approved-At: Fri, 09 Dec 2022 13:50:24 +0100 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.6 at phobos.denx.de X-Virus-Status: Clean When the number of parameters is wrong, the return value should be processed in the same way as other cmds, return CMD_RET_USAGE so that it can print the information. Signed-off-by: Shenlin Liang --- cmd/mvebu/comphy_rx_training.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/mvebu/comphy_rx_training.c b/cmd/mvebu/comphy_rx_training.c index 25a9e153de..4ee8f54ea9 100644 --- a/cmd/mvebu/comphy_rx_training.c +++ b/cmd/mvebu/comphy_rx_training.c @@ -22,7 +22,7 @@ int mvebu_comphy_rx_training_cmd(struct cmd_tbl *cmdtp, int flag, int argc, if (argc != 3) { printf("missing arguments\n"); - return -1; + return CMD_RET_USAGE; } cp_index = hextoul(argv[1], NULL); -- 2.31.1.windows.1