RE: list iterator spacing: clang-format vs checkpatch

From: David Laight
Date: Tue Jan 18 2022 - 04:28:04 EST


From: Joe Perches
> Sent: 17 January 2022 18:05
>
> On Mon, 2022-01-17 at 13:47 +0100, Jason A. Donenfeld wrote:
> > Hey again,
>
> Rehi.
>
> > Four years later I went through basically the same motions: "oh hey I
> > should clean this up", "I'll start with clang format", "oh cool it
> > adds spaces before the iterator paren so it looks like a normal for
> > loop to me", "that seems so reasonable; I love clang format", "oh no
> > checkpatch.pl complains; I hope it's wrong", "I wonder if anybody has
> > thought about this before", "oh, look, I asked about this already in
> > 2018."

Personally I think it should look like a #define expansion, not
part of the language.

I did notice it in the recent patch - and though it looked wrong.

David

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