login
Header Space

 
 

Re: checkpatch and kernel/sched.c

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Ingo Molnar <mingo@...>, <linux-kernel@...>
Date: Monday, October 1, 2007 - 8:34 am

On Mon, Oct 01, 2007 at 12:30:07AM -0700, Andrew Morton wrote:

Actually checkpatch does take that into account.  If the printk has no
precceding printk ending in a newline, within the scope of the diff
then the warning is suppressed.

However, in this mm/sched.c case there are paths through the code which
do violate the "every line starts with KERN_" mantra.  Now checkpatch is
actually not clever enough to spot that these are conditional, but in
this case there is an error.  Its not important as it is debug.  But I
contend there is an erorr.  When an error is thrown we close the
unfinished line, emit a line at KERN_ERR and then continue to emit the
previous line without switching to KERN_DEBUG again.


Checkpatch is capable of making the determination as at the time we
emit the warning we have all of the block in question.  We already allow
a number of other exceptions.  Just I think what I think the "rule" is
and its actuallity are not the same.

Are we saying the rule is "braces are not required for single _line_
blocks?


-apw
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: checkpatch and kernel/sched.c, Ingo Molnar, (Mon Oct 1, 2:44 am)
Re: checkpatch and kernel/sched.c, Andrew Morton, (Mon Oct 1, 3:30 am)
Re: checkpatch and kernel/sched.c, Willy Tarreau, (Tue Oct 2, 12:34 am)
[patch] printk: add KERN_CONT annotation, Ingo Molnar, (Tue Oct 2, 1:18 am)
Re: [patch] printk: add KERN_CONT annotation, Andrew Morton, (Thu Oct 4, 4:43 pm)
Re: [patch] printk: add KERN_CONT annotation, Ingo Molnar, (Thu Oct 4, 4:52 pm)
Re: [patch] printk: add KERN_CONT annotation, Joe Perches, (Tue Oct 2, 11:41 am)
Re: [patch] printk: add KERN_CONT annotation, Jan Engelhardt, (Tue Oct 2, 11:45 am)
Re: [patch] printk: add KERN_CONT annotation, Joe Perches, (Tue Oct 2, 12:03 pm)
Re: [patch] printk: add KERN_CONT annotation, Jan Engelhardt, (Tue Oct 2, 12:07 pm)
Re: checkpatch and kernel/sched.c, Andy Whitcroft, (Mon Oct 1, 8:34 am)
Re: checkpatch and kernel/sched.c, Ingo Molnar, (Mon Oct 1, 6:44 am)
Re: checkpatch and kernel/sched.c, Ingo Molnar, (Mon Oct 1, 6:37 am)
Re: checkpatch and kernel/sched.c, Sam Ravnborg, (Mon Oct 1, 3:50 am)
Re: checkpatch and kernel/sched.c, Avi Kivity, (Mon Oct 1, 3:48 am)
Re: checkpatch and kernel/sched.c, Andrew Morton, (Mon Oct 1, 3:39 am)
Re: checkpatch and kernel/sched.c, Ingo Molnar, (Mon Oct 1, 6:39 am)
speck-geostationary