RE: [PATCH v2] kbuild: Change fallthrough comments to attributes
From: David Laight
Date: Tue Aug 13 2019 - 05:48:09 EST
From: Joe Perches
> Sent: 13 August 2019 08:05
...
> The afs ones seem to be because the last comment in the block
> is not the fallthrough, but a description of the next case;
>
> e.g.: from fs/afs/fsclient.c:
>
> /* extract the volume name */
> case 3:
> _debug("extract volname");
I'd change those to:
case 3: /* extract the volume name */
Then the /* fall through */ would be fine.
The /* FALLTHROUGH */ comment has been valid C syntax (for lint)
for over 40 years.
IMHO since C compilers are now doing all the checks that lint used
to do, it should be using the same syntax.
Both the [[]] and attribute forms look horrid.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)