[U-Boot] [PATCH] common: fix help command breakage
Wolfgang Denk
wd at denx.de
Thu Nov 8 11:41:10 CET 2012
Dear Kim Phillips,
In message <20121105195111.8a326673862d0552354e2815 at freescale.com> you wrote:
> commit 199adb601ff34bdbbd0667fac80dfe0a87bffc2b "common/misc: sparse
> fixes" broke the help command trying to fix the sparse error
> "command.c:44:38: error: bad constant expression".
>
> As Henrik points out, the fix was bad because the commit used
> CONFIG_SYS_MAXARGS whereas the code intended to use the maximum
> number of commands (not arguments to a command).
>
> this patch fixes both by making the allocation manually on the heap.
>
> Reported-by: Henrik Nordstr=F6m <henrik at henriknordstrom.net>
> Signed-off-by: Kim Phillips <kim.phillips at freescale.com>
> ---
> tested on an 8572ds board
>
> common/command.c | 21 ++++++++++++---------
> 1 file changed, 12 insertions(+), 9 deletions(-)
Thanks for the fix, and Anatolij, thanks for picking it up, but I
actually think the whole approach is broken,a nd we whould just revert
the original patch.
Theer is nothing wrong with the original code. It was technically
correct, and only sparse had a different opinion. In this case we
should find ways to silence sparse, or configure it in a way to allow
us using correct and efficient code.
What we have is not only slower, but also increases the memory
footprint with zero benefit.
I object against this, and ask to revert the original modification
instead.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Respect is a rational process
-- McCoy, "The Galileo Seven", stardate 2822.3
More information about the U-Boot
mailing list