diff options
author | Simon Glass | 2021-07-24 09:03:30 -0600 |
---|---|---|
committer | Tom Rini | 2021-08-02 13:32:14 -0400 |
commit | 0b1284eb52578e15ec611adc5fee1a9ae68dadea (patch) | |
tree | 2d83815e93fc16decbaa5671fd660ade0ec74532 /cmd/remoteproc.c | |
parent | 7e5f460ec457fe310156e399198a41eb0ce1e98c (diff) |
global: Convert simple_strtoul() with decimal to dectoul()
It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/remoteproc.c')
-rw-r--r-- | cmd/remoteproc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/remoteproc.c b/cmd/remoteproc.c index 2a0e5759716..ca3b436242a 100644 --- a/cmd/remoteproc.c +++ b/cmd/remoteproc.c @@ -84,7 +84,7 @@ static int do_rproc_init(struct cmd_tbl *cmdtp, int flag, int argc, return 0; printf("Few Remote Processors failed to be initialized\n"); } else if (argc == 2) { - id = (int)simple_strtoul(argv[1], NULL, 10); + id = (int)dectoul(argv[1], NULL); if (!rproc_dev_init(id)) return 0; printf("Remote Processor %d failed to be initialized\n", id); @@ -129,7 +129,7 @@ static int do_remoteproc_load(struct cmd_tbl *cmdtp, int flag, int argc, if (argc != 4) return CMD_RET_USAGE; - id = (int)simple_strtoul(argv[1], NULL, 10); + id = (int)dectoul(argv[1], NULL); addr = hextoul(argv[2], NULL); size = hextoul(argv[3], NULL); @@ -167,7 +167,7 @@ static int do_remoteproc_wrapper(struct cmd_tbl *cmdtp, int flag, int argc, if (argc != 2) return CMD_RET_USAGE; - id = (int)simple_strtoul(argv[1], NULL, 10); + id = (int)dectoul(argv[1], NULL); if (!strcmp(argv[0], "start")) { ret = rproc_start(id); |