From: Joe Perches <joe@perches.com>
To: linux-embedded@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Paul Gortmaker <paul.gortmaker@windriver.com>,
David Woodhouse <dwmw2@infradead.org>,
Matt Mackall <mpm@selenic.com>, Tim Bird <tim.bird@am.sony.com>
Subject: [RFC] move __devinit or __init printk constant format strings to __devinitconst or __initdata?
Date: Tue, 21 Jul 2009 14:20:53 -0700 [thread overview]
Message-ID: <1248211253.31365.337.camel@Joe-Laptop.home> (raw)
Is moving constant string formats to __devinitconst or __initdata
useful for embedded environments?
As in:
#define printk_section(section, fmt, ...) \
({ static const section char __fmt[] = fmt; printk(__fmt, ##__VA_ARGS__); })
#define pr_err_section(section, fmt, ...) \
printk_section(section, KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
with a use of:
static int __devinit foo_probe(struct platform_device *pdev)
{
if (bar())
pr_err_section(__devinitconst,
"A long error message\n");
}
or
static int __init foo_init(struct platform_device *pdev)
{
if (bar())
pr_err_section(__initdata,
"A long error message\n");
}
next reply other threads:[~2009-07-21 21:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 21:20 Joe Perches [this message]
2009-07-21 21:48 ` [RFC] move __devinit or __init printk constant format strings to __devinitconst or __initdata? Matt Mackall
2009-07-21 21:56 ` Joe Perches
2009-07-21 22:57 ` Matt Mackall
2009-07-21 23:05 ` Joe Perches
2009-07-21 23:50 ` David Daney
2009-07-22 1:28 ` Matt Mackall
2009-07-22 4:50 ` Joe Perches
2009-07-22 5:17 ` Matt Mackall
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=1248211253.31365.337.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=dwmw2@infradead.org \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=paul.gortmaker@windriver.com \
--cc=tim.bird@am.sony.com \
/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;
as well as URLs for NNTP newsgroup(s).