mirror of
https://xff.cz/git/u-boot/
synced 2025-10-22 10:31:56 +02:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user