linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] move __devinit or __init printk constant format strings to __devinitconst or __initdata?
@ 2009-07-21 21:20 Joe Perches
  2009-07-21 21:48 ` Matt Mackall
  0 siblings, 1 reply; 9+ messages in thread
From: Joe Perches @ 2009-07-21 21:20 UTC (permalink / raw)
  To: linux-embedded
  Cc: linux-kernel, Paul Gortmaker, David Woodhouse, Matt Mackall,
	Tim Bird

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");
}


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-07-22  5:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 21:20 [RFC] move __devinit or __init printk constant format strings to __devinitconst or __initdata? Joe Perches
2009-07-21 21:48 ` 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

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).