diff options
author | Joe Perches <joe@perches.com> | 2013-04-17 18:58:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-17 19:10:44 -0400 |
commit | e942e2c3f7e093fc8756dd8b47c93a821c09429f (patch) | |
tree | 78e410a09d5b9d0f7e7129bfe998658863cfaf16 /scripts | |
parent | d875cf08391a811703f8adf39db598cac9ece6a1 (diff) |
checkpatch: fix stringification macro defect
Fix checkpatch misreporting defect with stringification macros
ERROR: Macros with complex values should be enclosed in parenthesis
#27: FILE: arch/arm/include/asm/kgdb.h:41:
+#define ___to_string(X) #X
Signed-off-by: Joe Perches <joe@perches.com>
Reported-by: Vincent Stehlé <v-stehle@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b28cc384a5bc..4de4bc48493b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -3016,6 +3016,7 @@ sub process { | |||
3016 | $dstat !~ /^'X'$/ && # character constants | 3016 | $dstat !~ /^'X'$/ && # character constants |
3017 | $dstat !~ /$exceptions/ && | 3017 | $dstat !~ /$exceptions/ && |
3018 | $dstat !~ /^\.$Ident\s*=/ && # .foo = | 3018 | $dstat !~ /^\.$Ident\s*=/ && # .foo = |
3019 | $dstat !~ /^(?:\#\s*$Ident|\#\s*$Constant)\s*$/ && # stringification #foo | ||
3019 | $dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ && # do {...} while (...); // do {...} while (...) | 3020 | $dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ && # do {...} while (...); // do {...} while (...) |
3020 | $dstat !~ /^for\s*$Constant$/ && # for (...) | 3021 | $dstat !~ /^for\s*$Constant$/ && # for (...) |
3021 | $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() | 3022 | $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() |