Re: checkpatch and kernel/sched.c

Andrew Morton
2007-10-01T07:40:47Z

On Mon, 01 Oct 2007 09:48:25 +0200 Avi Kivity <avi@qumranet.com> wrote:

> Andrew Morton wrote:
> >> this is actually a false positive - as the debug code constructs a
> >> printk output _without_ \n. So the script should check whether there's
> >> any \n in the printk string - if there is none, do not emit a warning.
> >> (if you implement that then i think it can remain a warning and does not
> >> need to move to CHECK.)
> >>
> >
> > Yeah, it does that sometimes. I don't think it's fixable within the scope
> > of checkpatch. It needs to check whether some preceding printk which might
> > not even be in the patch has a \n:
> >
> > printk(KERN_ERR "foo");
> > <100 lines of whatever>
> > + printk("bar\n");
> >
> > we're screwed...
> >
> >
>
> Isn't that broken on SMP (or with preemption) anyway?

Yep. Or with interrupts...