[PATCH 3/5] checkpatch: complex macros need to ignore comments

From: Andy Whitcroft
Date: Wed Jul 02 2008 - 07:34:33 EST


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 <apw@xxxxxxxxxxxx>
---
scripts/checkpatch.pl | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 8afa88a..96a762b 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;
--
1.5.6.1.201.g3e7d3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/