From: Mike Frysinger Date: Fri, 15 Feb 2008 00:54:45 -0500 Subject: [U-Boot-Users] [PATCH] Add call command on PPC In-Reply-To: References: Message-ID: <200802150054.46595.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday 15 February 2008, Kumar Gala wrote: > --- /dev/null > +++ b/lib_ppc/cmd_call.c there's nothing ppc specific about this > + if ((argc < 2) || (argc > 10)) { > ... > +U_BOOT_CMD( > + call, CFG_MAXARGS, 1, do_call, considering the u-boot infrastructure for commands will do the max checking for you, there's no need to check the upper bound of argc. it's also out of sync: in one place you have a random "10" but in another you have "CFG_MAXARGS". > + (*img)(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7]); > + > + /* may not return */ > + > + return 0; why not ? you might as well not arbitrarily limit things and have the prototype return an int and have it return that instead of "0": return (*img)(r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7]); -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 827 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20080215/6ceb1be8/attachment.pgp