Re: [PATCH] update checkpatch.pl to version 0.08

SL Baur
2007-07-25T15:39:46Z

On 7/24/07, Adrian Bunk <bunk@stusta.de> wrote:

> There are more important things than exploiting the corner cases of
> codingstyle, e.g. could you teach checkpatch.pl to give exactly two
> errors for the following code?
>
>
> while (a);
> for (b = 0; b < 50; b++);
> for (c = 0; c < sizeof(struct module); c++)
> d = e;

There are three errors there. The while (a) busy wait needs a cpu_relax()
or something, the first for is at the wrong level of indentation and the
second for is at the wrong level of indentation relative to the first one.