[U-Boot] [PATCH 10/10] Convert cmd_usage() calls in common to use a return value

Igor Grinberg grinberg at compulab.co.il
Wed Dec 7 13:47:47 CET 2011


Hi Simon,

On 12/07/11 07:47, Simon Glass wrote:
> 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: Simon Glass <sjg at chromium.org>
> ---

[...]

> diff --git a/common/cmd_mmc_spi.c b/common/cmd_mmc_spi.c
> index cfd0fb1..3153610 100644
> --- a/common/cmd_mmc_spi.c
> +++ b/common/cmd_mmc_spi.c
> @@ -78,7 +78,7 @@ static int do_mmc_spi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>  	return 0;
>  
>  usage:
> -	cmd_usage(cmdtp);
> +	return CMD_RET_USAGE;
>  	return 1;

You, probably, also want to remove the above line...

[...]


-- 
Regards,
Igor.


More information about the U-Boot mailing list