
Dear Kim Phillips,
In message 20121105195111.8a326673862d0552354e2815@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@henriknordstrom.net Signed-off-by: Kim Phillips kim.phillips@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