[U-Boot] [PATCH 1/1 V3] cmd_bdinfo: move implementation to arch instead of common
Mike Frysinger
vapier at gentoo.org
Sat Feb 21 17:07:19 CET 2009
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 <vapier at gentoo.org>
-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
More information about the U-Boot
mailing list