From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1 V3] cmd_bdinfo: move implementation to arch instead of common
Date: Sat, 21 Feb 2009 17:13:48 +0100 [thread overview]
Message-ID: <20090221161348.GA26207@game.jcrosoft.org> (raw)
In-Reply-To: <200902211107.20286.vapier@gentoo.org>
On 11:07 Sat 21 Feb , Mike Frysinger wrote:
> 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.
done in the bdinfo.h
but IIRC we specify it's weak here not in the header
>
> > +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.
ok
Best Regards,
J.
next prev parent reply other threads:[~2009-02-21 16:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-21 8:46 [U-Boot] [PATCH 1/1 V3] cmd_bdinfo: move implementation to arch instead of common Jean-Christophe PLAGNIOL-VILLARD
2009-02-21 9:13 ` Magnus Lilja
2009-02-21 16:02 ` Mike Frysinger
2009-02-21 16:07 ` Mike Frysinger
2009-02-21 16:13 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2009-02-23 8:22 ` Haavard Skinnemoen
2009-02-23 14:39 ` Mike Frysinger
2009-02-24 5:31 ` Jean-Christophe PLAGNIOL-VILLARD
2009-02-24 5:35 ` [U-Boot] [PATCH 1/2 V4] " Jean-Christophe PLAGNIOL-VILLARD
2009-02-24 5:35 ` [U-Boot] [PATCH 2/2] bdinfo: coding style cleanup Jean-Christophe PLAGNIOL-VILLARD
2009-04-03 21:50 ` [U-Boot] [PATCH 1/2 V4] cmd_bdinfo: move implementation to arch instead of common Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090221161348.GA26207@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox