Commit 4c12eeb8 authored by Simon Glass's avatar Simon Glass Committed by Wolfgang Denk

Convert cmd_usage() calls in common to use a return value

Change all files in common/ to use CMD_RET_USAGE instead of calling
cmd_usage() directly. I'm not completely sure about this patch since
the code since impact is small (100 byte or so on ARM) and it might
need splitting into smaller patches. But for now here it is.
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 9d12d5d4
......@@ -84,7 +84,7 @@ int do_bedbug_dis (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
len = dis_last_len;
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
if ((flag & CMD_FLAG_REPEAT) == 0) {
/* New command */
......@@ -123,7 +123,7 @@ int do_bedbug_asm (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
int rcode = 0;
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
printf ("\nEnter '.' when done\n");
mem_addr = simple_strtoul (argv[1], NULL, 16);
......
......@@ -102,7 +102,7 @@ static int do_bmp_info(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[
addr = simple_strtoul(argv[1], NULL, 16);
break;
default:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
return (bmp_info(addr));
......@@ -126,7 +126,7 @@ static int do_bmp_display(cmd_tbl_t * cmdtp, int flag, int argc, char * const ar
y = simple_strtoul(argv[3], NULL, 10);
break;
default:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
return (bmp_display(addr, x, y));
......@@ -166,7 +166,7 @@ static int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (c)
return c->cmd(cmdtp, flag, argc, argv);
else
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
U_BOOT_CMD(
......
......@@ -43,7 +43,7 @@ int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int rcode = 0;
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
addr = simple_strtoul(argv[1], NULL, 16);
......
......@@ -493,12 +493,12 @@ int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc,
}
} else {
/* Unrecognized command */
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
if (images.state >= state) {
printf("Trying to execute a command out of order\n");
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
images.state |= state;
......
......@@ -54,7 +54,7 @@ int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
icache_status() ? "ON" : "OFF");
return 0;
default:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
return 0;
}
......@@ -83,7 +83,7 @@ int do_dcache ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
dcache_status() ? "ON" : "OFF");
return 0;
default:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
return 0;
......
......@@ -41,7 +41,7 @@ int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char * const arg
AT91F_GetMuxStatus () ? "MMC" : "SPI");
return 0;
default:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
return 0;
}
......
......@@ -93,8 +93,7 @@ int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
break;
default:
cmd_usage(cmdtp);
rcode = 1;
rcode = CMD_RET_USAGE;
}
/* switch back to original I2C bus */
......
......@@ -45,7 +45,7 @@ int do_getdcr ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] )
/* Validate arguments */
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* Get a DCR */
dcrn = (unsigned short) simple_strtoul (argv[1], NULL, 16);
......@@ -71,7 +71,7 @@ int do_setdcr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
/* Validate arguments */
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* Set a DCR */
dcrn = (unsigned short) simple_strtoul (argv[1], NULL, 16);
......@@ -116,7 +116,7 @@ int do_getidcr (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* Validate arguments */
if (argc < 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* Find out whether ther is '.' (dot) symbol in the first parameter. */
strncpy (buf, argv[1], sizeof(buf)-1);
......@@ -170,7 +170,7 @@ int do_setidcr (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
/* Validate arguments */
if (argc < 4)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* Find out whether ther is '.' (dot) symbol in the first parameter. */
strncpy (buf, argv[1], sizeof(buf)-1);
......
......@@ -27,7 +27,7 @@ static int do_df(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
usage:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
U_BOOT_CMD(
......
......@@ -104,7 +104,7 @@ int do_eeprom ( cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
}
}
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
#endif
......
......@@ -66,7 +66,7 @@ int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int part_length;
if (argc < 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
dev = (int)simple_strtoul (argv[2], &ep, 16);
dev_desc = get_dev(argv[1],dev);
......@@ -163,7 +163,7 @@ int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
break;
default:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
if (!filename) {
......
......@@ -744,7 +744,7 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
boot_drive=simple_strtoul(argv[2], NULL, 10);
break;
default:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
/* setup FDC and scan for drives */
if(fdc_setup(boot_drive,pCMD,pFG)==FALSE) {
......
......@@ -72,7 +72,7 @@ int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
name = argv [2];
break;
default:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
/* Init physical layer */
......
......@@ -66,7 +66,7 @@ void set_working_fdt_addr(void *addr)
int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* Set the address of the fdt
......@@ -123,7 +123,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
int err;
if (argc < 4)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* Set the address and length of the fdt.
......@@ -175,7 +175,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
* Parameters: Node path, new node to be appended to the path.
*/
if (argc < 4)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
pathp = argv[2];
nodep = argv[3];
......@@ -211,7 +211,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
* Parameters: Node path, property, optional value.
*/
if (argc < 4)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
pathp = argv[2];
prop = argv[3];
......@@ -409,7 +409,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
}
} else {
/* Unrecognized command */
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
}
#ifdef CONFIG_OF_BOARD_SETUP
......@@ -422,7 +422,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
unsigned long initrd_start = 0, initrd_end = 0;
if ((argc != 2) && (argc != 4))
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
if (argc == 4) {
initrd_start = simple_strtoul(argv[2], NULL, 16);
......@@ -438,7 +438,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
}
else {
/* Unrecognized command */
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
return 0;
......
......@@ -20,7 +20,7 @@ static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ulong addr = 0UL;
if (argc > 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
if (argc == 2)
addr = simple_strtoul(argv[1], NULL, 16);
......
......@@ -335,7 +335,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int rcode = 0;
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
if (strcmp(argv[1], "all") == 0) {
for (bank=1; bank<=CONFIG_SYS_MAX_FLASH_BANKS; ++bank) {
......@@ -384,7 +384,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#endif
if (argc != 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
if (strcmp(argv[1], "bank") == 0) {
bank = simple_strtoul(argv[2], NULL, 16);
......@@ -405,7 +405,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
if (addr_first >= addr_last)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
rcode = flash_sect_erase(addr_first, addr_last);
return rcode;
......@@ -475,7 +475,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#endif
if (argc < 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
#if !defined(CONFIG_SYS_NO_FLASH) || defined(CONFIG_HAS_DATAFLASH)
if (strcmp(argv[1], "off") == 0)
......@@ -483,7 +483,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
else if (strcmp(argv[1], "on") == 0)
p = 1;
else
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
#endif
#ifdef CONFIG_HAS_DATAFLASH
......@@ -583,7 +583,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#endif
if (argc != 4)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
if (strcmp(argv[2], "bank") == 0) {
bank = simple_strtoul(argv[3], NULL, 16);
......@@ -623,7 +623,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
if (addr_first >= addr_last)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
rcode = flash_sect_protect (p, addr_first, addr_last);
#endif /* CONFIG_SYS_NO_FLASH */
......
......@@ -255,7 +255,7 @@ int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
switch (op) {
case FPGA_NONE:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
case FPGA_INFO:
rc = fpga_info (dev);
......@@ -334,7 +334,7 @@ int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
default:
printf ("Unknown operation\n");
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
return (rc);
}
......
......@@ -38,7 +38,7 @@ static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (argc != 3)
show_usage:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
str_cmd = argv[1];
str_gpio = argv[2];
......
......@@ -190,7 +190,7 @@ static int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv
u_char *memaddr;
if (argc != 5)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* I2C chip address
......@@ -204,7 +204,7 @@ static int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv
devaddr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* Length is the number of objects, not number of bytes.
......@@ -242,7 +242,7 @@ static int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
length = i2c_dp_last_length;
if (argc < 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
if ((flag & CMD_FLAG_REPEAT) == 0) {
/*
......@@ -261,7 +261,7 @@ static int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
addr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* If another parameter, it is the length to display.
......@@ -330,7 +330,7 @@ static int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
int count;
if ((argc < 4) || (argc > 5))
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* Chip is always specified.
......@@ -343,7 +343,7 @@ static int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
addr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* Value to write is always specified.
......@@ -392,7 +392,7 @@ static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
ulong err;
if (argc < 4)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* Chip is always specified.
......@@ -405,7 +405,7 @@ static int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
addr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* Count is always specified
......@@ -451,7 +451,7 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const arg
int nbytes;
if (argc != 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
#ifdef CONFIG_BOOT_RETRY_TIME
reset_cmd_timeout(); /* got a good command to get here */
......@@ -482,7 +482,7 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const arg
addr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
/*
......@@ -613,7 +613,7 @@ static int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
int delay;
if (argc < 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* Chip is always specified.
......@@ -626,7 +626,7 @@ static int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]
addr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* Length is the number of objects, not number of bytes.
......@@ -765,7 +765,7 @@ static int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
};
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* Chip is always specified.
......@@ -1300,7 +1300,7 @@ static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
cmd_tbl_t *c;
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* Strip off leading 'i2c' command argument */
argc--;
......@@ -1309,9 +1309,9 @@ static int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
c = find_cmd_tbl(argv[0], &cmd_i2c_sub[0], ARRAY_SIZE(cmd_i2c_sub));
if (c)
return c->cmd(cmdtp, flag, argc, argv);
return c->cmd(cmdtp, flag, argc, argv);
else
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
/***************************************************/
......
......@@ -179,7 +179,7 @@ int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
switch (argc) {
case 0:
case 1:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
case 2:
if (strncmp(argv[1], "res", 3) == 0) {
puts("\nReset IDE"
......@@ -232,7 +232,7 @@ int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
}
return rcode;
}
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
case 3:
if (strncmp(argv[1], "dev", 3) == 0) {
int dev = (int) simple_strtoul(argv[2], NULL, 10);
......@@ -266,7 +266,7 @@ int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return rcode;
}
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
default:
/* at least 4 args */
......@@ -325,7 +325,7 @@ int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
else
return 1;
} else {
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
return rcode;
......@@ -361,7 +361,7 @@ int do_diskboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
break;
default:
show_boot_progress(-42);
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
show_boot_progress(42);
......
......@@ -28,7 +28,7 @@ int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc != 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* on */
if (strncmp(argv[1], "on", 2) == 0)
......
......@@ -161,7 +161,7 @@ int do_itest ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] )
/* Validate arguments */
if ((argc != 4))
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* Check for a data width specification.
* Defaults to long (4) if no specification.
......
......@@ -93,12 +93,12 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* Validate arguments */
if ((argc != 3)) {
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
cmd = get_led_cmd(argv[2]);
if (cmd < 0) {
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
for (i = 0; led_commands[i].string; i++) {
......@@ -132,7 +132,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* If we ran out of matches, print Usage */
if (!match) {
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
return 0;
......
......@@ -1102,7 +1102,7 @@ int do_hwflow (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (strcmp(argv[1], "on") == 0)
hwflow_onoff(1);
else
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
printf("RTS/CTS hardware flow control: %s\n", hwflow_onoff(0) ? "on" : "off");
return 0;
......
......@@ -241,10 +241,10 @@ int do_log (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
return 0;
}
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
default:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
}
......
......@@ -32,7 +32,7 @@ static int do_md5sum(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
u8 output[16];
if (argc < 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
addr = simple_strtoul(argv[1], NULL, 16);
len = simple_strtoul(argv[2], NULL, 16);
......
......@@ -193,7 +193,7 @@ static int do_mdio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
struct mii_dev *bus;
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/*
* We use the last specified parameters, unless new ones are
......
......@@ -74,7 +74,7 @@ int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
length = dp_last_length;
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
if ((flag & CMD_FLAG_REPEAT) == 0) {
/* New command specified. Check for a size specification.
......@@ -168,7 +168,7 @@ int do_mem_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int size;
if ((argc < 3) || (argc > 4))
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* Check for size specification.
*/
......@@ -210,7 +210,7 @@ int do_mem_mdc ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ulong count;
if (argc < 4)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
count = simple_strtoul(argv[3], NULL, 10);
......@@ -237,7 +237,7 @@ int do_mem_mwc ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ulong count;
if (argc < 4)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
count = simple_strtoul(argv[3], NULL, 10);
......@@ -266,7 +266,7 @@ int do_mem_cmp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int rcode = 0;
if (argc != 4)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* Check for size specification.
*/
......@@ -352,7 +352,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int size;
if (argc != 4)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* Check for size specification.
*/
......@@ -478,7 +478,7 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
volatile u_char *cp;
if (argc < 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* Check for a size spefication.
* Defaults to long if no or incorrect specification.
......@@ -547,7 +547,7 @@ int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
volatile u_char *cp;
if (argc < 4)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
/* Check for a size spefication.
* Defaults to long if no or incorrect specification.
......@@ -979,7 +979,7 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char * const argv[])
int nbytes, size;
if (argc != 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
#ifdef CONFIG_BOOT_RETRY_TIME
reset_cmd_timeout(); /* got a good command to get here */
......@@ -1084,7 +1084,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ulong *ptr;
if (argc < 3)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
addr = simple_strtoul (argv[1], NULL, 16);
addr += base_address;
......@@ -1118,7 +1118,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (argc < 3) {
usage:
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
}
av = argv + 1;
......
......@@ -38,13 +38,13 @@ int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
unsigned int blocking;
if (argc < 2)
return cmd_usage(cmdtp);
return CMD_RET_USAGE;
fslnum = (unsigned int)simple_strtoul (argv[1], NULL, 16);
blocking = (unsigned int)simple_strtoul (argv[2], NULL, 16);
if (fslnum < 0 || fslnum >= XILINX_FSL_NUMBER) {
puts ("Bad number of FSL\n");
return cmd_usage(cmdtp);