[U-Boot-Users] [Patch] U-Boot-V2: parser.c sparse cleanup

Sascha Hauer s.hauer at pengutronix.de
Mon May 12 15:27:55 CEST 2008


On Mon, May 12, 2008 at 07:24:43AM -0500, Menon, Nishanth wrote:
> This patch cleans up the parser error seen during simple parser compilation.
> Please note that CFG_CMD_BOOTD is not defined at the moment, but leaving it for addition at a later point of time.
> 
> Signed-off-by: Nishanth Menon <x0nishan at ti.com>
> 
> Index: u-boot-v2.git/common/parser.c
> ===================================================================
> --- u-boot-v2.git.orig/common/parser.c	2008-05-08 17:36:18.000000000 -0500
> +++ u-boot-v2.git/common/parser.c	2008-05-08 17:43:27.000000000 -0500
> @@ -2,7 +2,7 @@
>  #include <command.h>
>  #include <environment.h>
>  
> -int parse_line (char *line, char *argv[])
> +static int parse_line (char *line, char *argv[])
>  {
>  	int nargs = 0;
>  
> @@ -265,7 +265,7 @@
>  			continue;
>  		}
>  
> -#if (CONFIG_COMMANDS & CFG_CMD_BOOTD)
> +#if defined(CONFIG_COMMANDS) & defined(CONFIG_CMD_BOOTD)

U-Boot v1 used to have a bitmask for enabled commands (CONFIG_COMMANDS)
and each command was represented by one bit, hence the construct above.
We don't have this anymore and I think that this recursion stop does not
work as expected anymore anyway, so you can remove this completely.

Sascha


-- 
Pengutronix e.K. - Linux Solutions for Science and Industry
-----------------------------------------------------------
Kontakt-Informationen finden Sie im Header dieser Mail oder
auf der Webseite -> http://www.pengutronix.de/impressum/ <-




More information about the U-Boot mailing list