[PATCH 06/23] checkpatch: comment detection: ignore macro continuation when detecting associated comments

From: Andy Whitcroft
Date: Thu Jun 12 2008 - 08:08:55 EST


When looking for an associated comment they may be suffixed by a macro
continuation. Ignore this.

Signed-off-by: Andy Whitcroft <apw@xxxxxxxxxxxx>
---
scripts/checkpatch.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index fd597a4..94250d1 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -631,7 +631,7 @@ sub ctx_locate_comment {
my ($first_line, $end_line) = @_;

# Catch a comment on the end of the line itself.
- my ($current_comment) = ($rawlines[$end_line - 1] =~ m@.*(/\*.*\*/)\s*$@);
+ my ($current_comment) = ($rawlines[$end_line - 1] =~ m@.*(/\*.*\*/)\s*(?:\\\s*)?$@);
return $current_comment if (defined $current_comment);

# Look through the context and try and figure out if there is a
--
1.5.6.rc0.140.ga9675

--
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/