Messages in this thread | | | Date | Thu, 18 Nov 2010 10:37:58 +0000 | From | Mark Brown <> | Subject | Re: [PATCH 1/2] drivers: regulator: core: use pr_fmt |
| |
On Wed, Nov 17, 2010 at 04:35:08PM -0800, Daniel Walker wrote: > On Wed, 2010-11-17 at 16:29 -0800, Joe Perches wrote:
> > > + pr_err("%s '%s' voltage constraints\n", "invalid", > > > + name);
> > Using a separate pointer for invalid and unsupportable > > doesn't save much text space and is very hard to grep.
> > I think it's more intelligible as:
> > pr_err("%s: Invalid voltage constraints\n", name);
> I noticed that also, but I didn't feel like changing it when I did this.
This is some stuff from David Brownell which slipped through in review and should be removed to just have the string. His theory is that this allows the compiler to merge multiple versions of the format string, resulting in a space saving but given how trivial the saving is and the impact on legibility it's really not worth it.
> printk(KERN_WARNING "%s: could not add regulator_dev" > " load sysfs\n", __func__);
> I'm not sure what this one was suppose to say.
That's a different thing - someone's just split the string over multiple lines - the two strings will just be concatenated.
| |