From: Joe Perches Date: Wed, 17 Apr 2013 22:58:26 +0000 (-0700) Subject: checkpatch: fix stringification macro defect X-Git-Tag: upstream/snapshot3+hdmi~5333^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e942e2c3f7e093fc8756dd8b47c93a821c09429f;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Reported-by: Vincent Stehlé Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b28cc38..4de4bc4 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3016,6 +3016,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()