diff options
author | Simon Glass <sjg@chromium.org> | 2021-07-24 09:03:30 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-08-02 13:32:14 -0400 |
commit | 0b1284eb52578e15ec611adc5fee1a9ae68dadea (patch) | |
tree | 2d83815e93fc16decbaa5671fd660ade0ec74532 /cmd/axi.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/axi.c')
-rw-r--r-- | cmd/axi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/axi.c b/cmd/axi.c index c676819b811..0c80fef0533 100644 --- a/cmd/axi.c +++ b/cmd/axi.c @@ -120,7 +120,7 @@ static int do_axi_show_bus(struct cmd_tbl *cmdtp, int flag, int argc, int i; /* show specific bus */ - i = simple_strtoul(argv[1], NULL, 10); + i = dectoul(argv[1], NULL); struct udevice *bus; int ret; @@ -153,7 +153,7 @@ static int do_axi_bus_num(struct cmd_tbl *cmdtp, int flag, int argc, printf("Current bus is %d\n", bus_no); } else { - bus_no = simple_strtoul(argv[1], NULL, 10); + bus_no = dectoul(argv[1], NULL); printf("Setting bus to %d\n", bus_no); ret = axi_set_cur_bus(bus_no); @@ -193,7 +193,7 @@ static int do_axi_md(struct cmd_tbl *cmdtp, int flag, int argc, } if ((flag & CMD_FLAG_REPEAT) == 0) { - size = simple_strtoul(argv[1], NULL, 10); + size = dectoul(argv[1], NULL); /* * Address is specified since argc >= 3 @@ -273,7 +273,7 @@ static int do_axi_mw(struct cmd_tbl *cmdtp, int flag, int argc, if (argc <= 3 || argc >= 6) return CMD_RET_USAGE; - size = simple_strtoul(argv[1], NULL, 10); + size = dectoul(argv[1], NULL); switch (size) { case 8: |