[U-Boot-Users] [Patch V2] U-Boot-V2: parser.c sparse cleanup
Menon, Nishanth
x0nishan at ti.com
Mon May 12 15:41:30 CEST 2008
Sascha,
> -----Original Message-----
> From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
> Sent: Monday, May 12, 2008 8:28 AM
> To: Menon, Nishanth
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [Patch] U-Boot-V2: parser.c sparse cleanup
>
> > -#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.
Rev 2 of the patch:
Index: u-boot-v2.git/common/parser.c
===================================================================
--- u-boot-v2.git.orig/common/parser.c 2008-05-12 08:26:56.000000000 -0500
+++ u-boot-v2.git/common/parser.c 2008-05-12 08:28:05.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,22 +265,6 @@
continue;
}
-#if (CONFIG_COMMANDS & CFG_CMD_BOOTD)
- /* avoid "bootd" recursion */
- if (cmdtp->cmd == do_bootd) {
-#ifdef DEBUG_PARSER
- printf ("[%s]\n", finaltoken);
-#endif
- if (flag & CMD_FLAG_BOOTD) {
- puts ("'bootd' recursion detected\n");
- rc = -1;
- continue;
- } else {
- flag |= CMD_FLAG_BOOTD;
- }
- }
-#endif /* CFG_CMD_BOOTD */
-
/* OK - call function to do the command */
if ((cmdtp->cmd) (cmdtp, argc, argv) != 0)
rc = -1;
More information about the U-Boot
mailing list