lkml.org 
[lkml]   [2009]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject[RFC] move __devinit or __init printk constant format strings to __devinitconst or __initdata?
From
Date
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");
}




\
 
 \ /
  Last update: 2009-07-21 23:23    [W:0.041 / U:4.940 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site