[RFC] move __devinit or __init printk constant format strings to__devinitconst or __initdata?

From: Joe Perches
Date: Tue Jul 21 2009 - 17:21:02 EST


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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/