RE: checkpatch

From: David Laight
Date: Thu Dec 10 2020 - 04:36:44 EST


From: Joe Perches
> Sent: 10 December 2020 05:26
>
> On Wed, 2020-12-09 at 19:13 +0100, Thomas Gleixner wrote:
> > Joe,
>
> Hi Thomas.
>
> > the below made it through my filters for some reason so I actually
> > looked and immediately wondered why checkpatch.pl did not identify this
> > as pure garbage.
> >
> >  Original mail is here: lore.kernel.org/r/69cb540a-09d5-4956-b062-071ccded7090@xxxxxx
> >
> > Can you have a look please? Adding brackets in the middle of the code
> > for absolutely no reason is wrong to begin with and then not indenting
> > the enclosed code makes it even worse.
>
> Well, maybe something like this, but there are probably some
> drawbacks with initializations.

Isn't the other likely problem where an extra code block
is being squeezed in after a case label without generating
a double-indent.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)