* [PATCH] checkpatch: Fix stringification macro defect
[not found] <51630753.6030609@ti.com>
@ 2013-04-08 18:49 ` Joe Perches
0 siblings, 0 replies; only message in thread
From: Joe Perches @ 2013-04-08 18:49 UTC (permalink / raw)
To: Andrew Morton; +Cc: Andy Whitcroft, Vincent Stehlé, LKML
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
Reported-by: Vincent Stehlé <v-stehle@ti.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
scripts/checkpatch.pl | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3fb6d86..2e802fc 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3024,6 +3024,7 @@ sub process {
$dstat !~ /^'X'$/ && # character constants
$dstat !~ /$exceptions/ &&
$dstat !~ /^\.$Ident\s*=/ && # .foo =
+ $dstat !~ /^(?:\#\s*$Ident|\#\s*$Constant)\s*$/ && # stringification #foo
$dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ && # do {...} while (...); // do {...} while (...)
$dstat !~ /^for\s*$Constant$/ && # for (...)
$dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar()
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-08 18:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <51630753.6030609@ti.com>
2013-04-08 18:49 ` [PATCH] checkpatch: Fix stringification macro defect Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®