Re: [PATCH RFC tip/core/rcu 2/2] rcu: Fix broken strings in RCU'ssource code.

From: Josh Triplett
Date: Thu May 17 2012 - 18:32:25 EST


On Fri, May 18, 2012 at 12:20:09AM +0200, Peter Zijlstra wrote:
> On Thu, 2012-05-17 at 15:12 -0700, Paul E. McKenney wrote:
> > From: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>
> >
> > Although the C language allows you to break strings across lines, doing
> > this makes it hard for people to find the Linux kernel code corresponding
> > to a given console message. This commit therefore fixes broken strings
> > throughout RCU's source code.
>
> While I'm not a strict 80 chars zealot, I do find exceedingly long lines
> utterly annoying, editors either wrap them in the most hideous way or
> you don't see them.

For the most part, printable strings should have a final formatted
length of less than 80 characters so that they don't wrap in dmesg, and
preferably a bit less so that they don't wrap when prefixed with a
high-resolution timestamp. Two main problems cause those strings to
take up more than 80 characters in source code: format specifiers that
take up more room than the parameters they format, and indentation plus
the name of the printing function. Even keeping those in mind, lines
with strings on them shouldn't end up insanely long; if they do, perhaps
that indicates that the lines should have some newlines in the middle.

- Josh Triplett
--
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/