diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index faea0ec612bfed2932ca5dc25868fe00888a5afc..2262e1f57fa6f3fad3f4329e122454874d48ff76 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2448,6 +2448,13 @@ sub process { "space prohibited between function name and open parenthesis '('\n" . $herecurr); } } + +# check for whitespace before a non-naked semicolon + if ($line =~ /^\+.*\S\s+;/) { + CHK("SPACING", + "space prohibited before semicolon\n" . $herecurr); + } + # Check operator spacing. if (!($line=~/\#\s*include/)) { my $ops = qr{