From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Wed, 7 Nov 2012 23:23:50 +0100 Subject: [U-Boot] [PATCH] common: fix help command breakage In-Reply-To: <20121105195111.8a326673862d0552354e2815@freescale.com> References: <1351553687-12469-1-git-send-email-kim.phillips@freescale.com> <1351553687-12469-11-git-send-email-kim.phillips@freescale.com> <1352151033.32226.3.camel@home.hno.se> <20121105195111.8a326673862d0552354e2815@freescale.com> Message-ID: <20121107232350.2957fd42@wker> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On Mon, 5 Nov 2012 19:51:11 -0600 Kim Phillips 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?m > Signed-off-by: Kim Phillips > --- > tested on an 8572ds board > > common/command.c | 21 ++++++++++++--------- > 1 file changed, 12 insertions(+), 9 deletions(-) Applied to staging/agust at denx.de. Thanks! Anatolij