Re: Treewide frequency of various checkpatch messages

From: Joe Perches
Date: Mon Mar 10 2014 - 16:12:10 EST


On Mon, 2014-03-10 at 12:33 -0700, Greg KH wrote:
> On Mon, Mar 10, 2014 at 11:48:50AM -0700, Joe Perches wrote:
[]
> > I've no strong opinion of the need to write code
> > like:
> >
> > {
> > u32 iterations = 0;
> >
> > while (arch_spin_is_locked(lock))
> > delay_backoff(iterations++);
> > }
>
> I wonder if there's a way to "count" the size of the function, and only
> complain if it's longer than 4-5 lines long?

No, there's isn't really.
checkpatch works on patch hunks.
The function scope isn't necessarily visible.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/