Skip to content

Commit 35630f4

Browse files
JoePerchessfrothwell
authored andcommitted
checkpatch: fix stringification macro defect
Fix checkpatch misreporting defect with stringification macros ERROR: Macros with complex values should be enclosed in parenthesis torvalds#27: FILE: arch/arm/include/asm/kgdb.h:41: +#define ___to_string(X) #X Signed-off-by: Joe Perches <[email protected]> Reported-by: Vincent Stehlé <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent cbcb242 commit 35630f4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/checkpatch.pl

+1
Original file line numberDiff line numberDiff line change
@@ -3016,6 +3016,7 @@ sub process {
30163016
$dstat !~ /^'X'$/ && # character constants
30173017
$dstat !~ /$exceptions/ &&
30183018
$dstat !~ /^\.$Ident\s*=/ && # .foo =
3019+
$dstat !~ /^(?:\#\s*$Ident|\#\s*$Constant)\s*$/ && # stringification #foo
30193020
$dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ && # do {...} while (...); // do {...} while (...)
30203021
$dstat !~ /^for\s*$Constant$/ && # for (...)
30213022
$dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar()

0 commit comments

Comments
 (0)