All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite.dk>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] Add an option to set a board specific banner
Date: Tue, 04 Jan 2011 00:53:43 +0100	[thread overview]
Message-ID: <87wrmlbl2w.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <20110103135058.GB24408@pengutronix.de> (Sascha Hauer's message of "Mon, 3 Jan 2011 14:50:58 +0100")

>>>>> "Sascha" == Sascha Hauer <s.hauer@pengutronix.de> writes:

 Sascha> Ok, I can see your problem. I think we should rather define a
 Sascha> board specific function to display a banner than a string, so
 Sascha> something like:

 Sascha> config BOARD_BANNER
 Sascha> 	bool

 Sascha> #ifdef CONFIG_BOARD_BANNER
 Sascha> 	display_board_banner();
 Sascha> #else
 Sascha> 	printf(RELOC("Board: " CONFIG_BOARDINFO "\n"));
 Sascha> #endif

Even better, stick:

#ifdef CONFIG_BOARD_BANNER
extern void display_board_banner(void);
#else
static inline void display_board_banner(void)
{
        printf(RELOC("Board: " CONFIG_BOARDINFO "\n"));
}
#endif

And get rid of the #ifdef in the C file.

-- 
Bye, Peter Korsgaard

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2011-01-03 23:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20101230034811.GS19266@game.jcrosoft.org>
2010-12-30 12:49 ` [PATCH] Add an option to set a board specific banner Franck JULLIEN
2010-12-31  7:24   ` Jean-Christophe PLAGNIOL-VILLARD
2011-01-03 11:41   ` Sascha Hauer
2011-01-03 12:45     ` Franck JULLIEN
2011-01-03 13:50       ` Sascha Hauer
2011-01-03 19:42         ` Franck JULLIEN
2011-01-03 23:53         ` Peter Korsgaard [this message]
2011-01-04  9:00           ` Sascha Hauer

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=87wrmlbl2w.fsf@macbook.be.48ers.dk \
    --to=jacmet@sunsite.dk \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.