diff options
author | Simon Glass <sjg@chromium.org> | 2021-07-24 18:03:30 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-08-02 20:32:14 +0300 |
commit | 0b1284eb52578e15ec611adc5fee1a9ae68dadea (patch) | |
tree | 2d83815e93fc16decbaa5671fd660ade0ec74532 /board/gdsys | |
parent | 7e5f460ec457fe310156e399198a41eb0ce1e98c (diff) | |
download | u-boot-0b1284eb52578e15ec611adc5fee1a9ae68dadea.tar.xz |
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 'board/gdsys')
-rw-r--r-- | board/gdsys/common/cmd_ioloop.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/board/gdsys/common/cmd_ioloop.c b/board/gdsys/common/cmd_ioloop.c index 658756d984..1412421a02 100644 --- a/board/gdsys/common/cmd_ioloop.c +++ b/board/gdsys/common/cmd_ioloop.c @@ -275,13 +275,13 @@ int do_ioreflect(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) if (argc < 2) return CMD_RET_USAGE; - fpga = simple_strtoul(argv[1], NULL, 10); + fpga = dectoul(argv[1], NULL); /* * If another parameter, it is the report rate in packets. */ if (argc > 2) - rate = simple_strtoul(argv[2], NULL, 10); + rate = dectoul(argv[2], NULL); /* Enable receive path */ FPGA_SET_REG(fpga, ep.rx_tx_control, CTRL_PROC_RECEIVE_ENABLE); @@ -388,18 +388,18 @@ int do_ioloop(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) /* * FPGA is specified since argc > 2 */ - fpga = simple_strtoul(argv[1], NULL, 10); + fpga = dectoul(argv[1], NULL); /* * packet size is specified since argc > 2 */ - size = simple_strtoul(argv[2], NULL, 10); + size = dectoul(argv[2], NULL); /* * If another parameter, it is the test rate in packets per second. */ if (argc > 3) - rate = simple_strtoul(argv[3], NULL, 10); + rate = dectoul(argv[3], NULL); /* enable receive path */ FPGA_SET_REG(fpga, ep.rx_tx_control, CTRL_PROC_RECEIVE_ENABLE); @@ -463,13 +463,13 @@ int do_ioloop(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) /* * packet size is specified since argc > 1 */ - size = simple_strtoul(argv[2], NULL, 10); + size = dectoul(argv[2], NULL); /* * If another parameter, it is the test rate in packets per second. */ if (argc > 2) - rate = simple_strtoul(argv[3], NULL, 10); + rate = dectoul(argv[3], NULL); /* Enable receive path */ misc_set_enabled(dev, true); @@ -514,7 +514,7 @@ int do_iodev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) return CMD_RET_FAILURE; if (argc > 1) { - int i = simple_strtoul(argv[1], NULL, 10); + int i = dectoul(argv[1], NULL); snprintf(name, sizeof(name), "ioep%d", i); |