From: Andy Whitcroft Date: Thu, 24 Jul 2008 04:28:59 +0000 (-0700) Subject: checkpatch: comment detection: ignore macro continuation when detecting associated... X-Git-Tag: v2.6.27-rc1~713 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=beae6332493a40116dba24928154621f2e88b9a9;p=linux-2.6-omap-h63xx.git checkpatch: comment detection: ignore macro continuation when detecting associated comments When looking for an associated comment they may be suffixed by a macro continuation. Ignore this. 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 fd597a4b5da..94250d1a3a4 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