From 0b1284eb52578e15ec611adc5fee1a9ae68dadea Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 Jul 2021 09:03:30 -0600 Subject: 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 --- cmd/usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd/usb.c') diff --git a/cmd/usb.c b/cmd/usb.c index b9ec29a8457..3d873765250 100644 --- a/cmd/usb.c +++ b/cmd/usb.c @@ -690,7 +690,7 @@ static int do_usb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) * have multiple controllers and the device numbering * starts at 1 on each bus. */ - i = simple_strtoul(argv[2], NULL, 10); + i = dectoul(argv[2], NULL); printf("config for device %d\n", i); udev = usb_find_device(i); if (udev == NULL) { @@ -706,13 +706,13 @@ static int do_usb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) if (strncmp(argv[1], "test", 4) == 0) { if (argc < 5) return CMD_RET_USAGE; - i = simple_strtoul(argv[2], NULL, 10); + i = dectoul(argv[2], NULL); udev = usb_find_device(i); if (udev == NULL) { printf("Device %d does not exist.\n", i); return 1; } - i = simple_strtoul(argv[3], NULL, 10); + i = dectoul(argv[3], NULL); return usb_test(udev, i, argv[4]); } #ifdef CONFIG_USB_STORAGE -- cgit v1.2.3