[PATCH v4]: Fix e500 v2 core reboot bug

Zang Roy-r61911 tie-fei.zang at freescale.com
Wed Jun 13 17:43:53 EST 2007


On Wed, 2007-06-13 at 15:26, Segher Boessenkool wrote:
> >>> +                             printk (KERN_EMERG "Error: reset
> >> control \
> >>> +                                     register not mapped,
> >> spinning!\n");
> >>
> >> ...(... "bla bla bla "
> >>         "bla bla bla\n");
> >>
> >> instead?  Or there'll be a lot of whitespace in your string.
> > I just do not know the difference of these two style.
> 
> Your code puts a bunch of extra whitespace in the string (all
> the tabs before "register not mapped").  Two strings after
> each other (like in my example) are just pasted together.
> 
> There is no real reason to break the string in two anyway, it
> is fine to have a more-than-80-char line in printk messages.
> 
I separate it, because I am afraid I will be  challenged by 80 char
column rule.

Please check the CodeStyle file and its example:

Statements longer than 80 columns will be broken into sensible chunks.
Descendants are always substantially shorter than the parent and are
placed
substantially to the right. The same applies to function headers with a
long
argument list. Long strings are as well broken into shorter strings.
[snip]
void fun(int a, int b, int c)
{
	if (condition)
		printk(KERN_WARNING "Warning this is a long printk with "
						"3 parameters a: %u b: %u "
						"c: %u \n", a, b, c);
	else
		next_statement;
}
[snip]
If it does not matter, I'd like to put them in one line :-).
Roy




More information about the Linuxppc-dev mailing list