Re: checkpatch and kernel/sched.c

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andy Whitcroft
Date: Monday, October 1, 2007 - 5: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, (Sun Sep 30, 11:44 pm)
Re: checkpatch and kernel/sched.c, Andrew Morton, (Mon Oct 1, 12:30 am)
Re: checkpatch and kernel/sched.c, Andrew Morton, (Mon Oct 1, 12:39 am)
Re: checkpatch and kernel/sched.c, Avi Kivity, (Mon Oct 1, 12:48 am)
Re: checkpatch and kernel/sched.c, Sam Ravnborg, (Mon Oct 1, 12:50 am)
Re: checkpatch and kernel/sched.c, Ingo Molnar, (Mon Oct 1, 3:37 am)
Re: checkpatch and kernel/sched.c, Ingo Molnar, (Mon Oct 1, 3:39 am)
Re: checkpatch and kernel/sched.c, Ingo Molnar, (Mon Oct 1, 3:44 am)
Re: checkpatch and kernel/sched.c, Andy Whitcroft, (Mon Oct 1, 5:34 am)
Re: checkpatch and kernel/sched.c, Willy Tarreau, (Mon Oct 1, 9:34 pm)
[patch] printk: add KERN_CONT annotation, Ingo Molnar, (Mon Oct 1, 10:18 pm)
Re: [patch] printk: add KERN_CONT annotation, Joe Perches, (Tue Oct 2, 8:41 am)
Re: [patch] printk: add KERN_CONT annotation, Jan Engelhardt, (Tue Oct 2, 8:45 am)
Re: [patch] printk: add KERN_CONT annotation, Joe Perches, (Tue Oct 2, 9:03 am)
Re: [patch] printk: add KERN_CONT annotation, Jan Engelhardt, (Tue Oct 2, 9:07 am)
Re: [patch] printk: add KERN_CONT annotation, Andrew Morton, (Thu Oct 4, 1:43 pm)
Re: [patch] printk: add KERN_CONT annotation, Ingo Molnar, (Thu Oct 4, 1:52 pm)