aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/checkpatch.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index bb4c8428f333..e7ff52a39ec9 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3821,6 +3821,17 @@ sub process {
3821 WARN("DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON", 3821 WARN("DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON",
3822 "do {} while (0) macros should not be semicolon terminated\n" . "$herectx"); 3822 "do {} while (0) macros should not be semicolon terminated\n" . "$herectx");
3823 } 3823 }
3824 } elsif ($dstat =~ /^\+\s*#\s*define\s+$Ident.*;\s*$/) {
3825 $ctx =~ s/\n*$//;
3826 my $cnt = statement_rawlines($ctx);
3827 my $herectx = $here . "\n";
3828
3829 for (my $n = 0; $n < $cnt; $n++) {
3830 $herectx .= raw_line($linenr, $n) . "\n";
3831 }
3832
3833 WARN("TRAILING_SEMICOLON",
3834 "macros should not use a trailing semicolon\n" . "$herectx");
3824 } 3835 }
3825 } 3836 }
3826 3837