Skip to content
Snippets Groups Projects
user avatar
Joe Perches authored
Commit b13edf7f ("checkpatch: add checks for do {} while (0) macro
misuses") added a test that is overly simplistic for single statement
macros.

Macros that start with control tests should be enclosed in a do {} while
(0) loop.

Add the necessary control tests to the check.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarAndy Whitcroft <apw@canonical.com>
Tested-by: default avatarFranz Schrober <franzschrober@yahoo.de>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
ac8e97f8
History