lkml.org 
[lkml]   [2010]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.


\
 
 \ /
  Last update: 2010-11-18 11:41    [W:0.082 / U:1.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site