Skip to content

Commit

Permalink
checkpatch: comment detection: ignore macro continuation when detecti…
Browse files Browse the repository at this point in the history
…ng associated comments

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

Signed-off-by: Andy Whitcroft <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
awhitcroft authored and torvalds committed Jul 24, 2008
1 parent d3ddcf4 commit beae633
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit beae633

Please sign in to comment.