From: Shenlin Liang <liangshenlin@eswincomputing.com>
To: u-boot@lists.denx.de
Cc: zhangdongdong@eswincomputing.com, jinyanjiang@eswincomputing.com,
zhengyu@eswincomputing.com, zhuwenjun@eswincomputing.com,
Shenlin Liang <liangshenlin@eswincomputing.com>
Subject: [PATCH 1/1] cmd: change the return value when argc error
Date: Fri, 9 Dec 2022 17:17:43 +0800 [thread overview]
Message-ID: <20221209091743.2424-2-liangshenlin@eswincomputing.com> (raw)
In-Reply-To: <20221209091743.2424-1-liangshenlin@eswincomputing.com>
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 <liangshenlin@eswincomputing.com>
---
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
next prev parent reply other threads:[~2022-12-09 12:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 9:17 [PATCH 0/1] cmd: change the return value when argc error Shenlin Liang
2022-12-09 9:17 ` Shenlin Liang [this message]
2022-12-13 5:58 ` [PATCH 1/1] " Simon Glass
2023-01-12 15:18 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221209091743.2424-2-liangshenlin@eswincomputing.com \
--to=liangshenlin@eswincomputing.com \
--cc=jinyanjiang@eswincomputing.com \
--cc=u-boot@lists.denx.de \
--cc=zhangdongdong@eswincomputing.com \
--cc=zhengyu@eswincomputing.com \
--cc=zhuwenjun@eswincomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.