[PATCH v4]: Fix e500 v2 core reboot bug

Li Yang-r58472 LeoLi at freescale.com
Wed Jun 13 17:49:44 EST 2007


> -----Original Message-----
> From: linuxppc-dev-bounces+leoli=freescale.com at ozlabs.org
[mailto:linuxppc-dev-bounces+leoli=freescale.com at ozlabs.org] On Behalf
Of
> Zang Roy-r61911
> Sent: Wednesday, June 13, 2007 3:44 PM
> To: Segher Boessenkool
> Cc: linuxppc-dev list; Paul Mackerras
> Subject: Re: [PATCH v4]: Fix e500 v2 core reboot bug
> 
> 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;
> }
It will be good if you do:
+				printk (KERN_EMERG "Error: reset
control"
+					"register not mapped,
spinning!\n");

Instead of:
+				printk (KERN_EMERG "Error: reset control
\
+					register not mapped,
spinning!\n");

- Leo



More information about the Linuxppc-dev mailing list