From: Mike Frysinger Date: Sat, 21 Feb 2009 11:07:19 -0500 Subject: [U-Boot] [PATCH 1/1 V3] cmd_bdinfo: move implementation to arch instead of common In-Reply-To: <1235205980-20534-1-git-send-email-plagnioj@jcrosoft.com> References: <1235205980-20534-1-git-send-email-plagnioj@jcrosoft.com> Message-ID: <200902211107.20286.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 Saturday 21 February 2009 03:46:20 Jean-Christophe PLAGNIOL-VILLARD wrote: > --- a/common/cmd_bdinfo.c > +++ b/common/cmd_bdinfo.c > +void board_bdinfo(cmd_tbl_t *, int, int, char **) __attribute__((weak)); > +void cpu_bdinfo(cmd_tbl_t *, int, int, char **) __attribute__((weak)); since other people are expected to implement these functions, better to put the prototype into a common header so that the implementation and the caller agree on the function signature. the compiler can check this way. > +int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) > +{ > + /* call arch bdinfo */ > + arch_bdinfo(cmdtp, flag, argc, argv); > + > + /* call soc bdinfo */ > + if(cpu_bdinfo) { > + printf("CPU Info\n"); > + cpu_bdinfo(cmdtp, flag, argc, argv); > + } > + > + /* call board bdinfo */ > + if(board_bdinfo) { > + printf("Board Info\n"); > + board_bdinfo(cmdtp, flag, argc, argv); > + } there should be a space after that "if". i would use "puts" instead of "printf" since you arent using any format strings. otherwise, the Blackfin part looks fine, thanks Acked-by: Mike Frysinger -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20090221/ee3caba7/attachment.pgp