From: Andy Whitcroft Date: Thu, 24 Jul 2008 04:29:11 +0000 (-0700) Subject: checkpatch: complex macros need to ignore comments X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=292f1a9b342d763f94ea3915726a48905be4acd1;p=openwrt%2Fstaging%2Fblogic.git checkpatch: complex macros need to ignore comments Ensure we ignore comments in complex macro detection else we incorrectly report this: #define PFM_GROUP_PERM_ANY -1 /* any user/group */ Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8afa88aaed96..96a762be5748 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1972,6 +1972,7 @@ sub process { } else { $dstat =~ s/^.\s*\#\s*define\s+$Ident\s*//; } + $dstat =~ s/$;//g; $dstat =~ s/\\\n.//g; $dstat =~ s/^\s*//s; $dstat =~ s/\s*$//s;