aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/checkpatch.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3e9fee60642c..e0a674f471ee 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3189,6 +3189,16 @@ sub process {
3189 } 3189 }
3190 } 3190 }
3191 3191
3192# check for unnecessary blank lines around braces
3193 if (($line =~ /^..*}\s*$/ && $prevline =~ /^.\s*$/)) {
3194 CHK("BRACES",
3195 "Blank lines aren't necessary before a close brace '}'\n" . $hereprev);
3196 }
3197 if (($line =~ /^.\s*$/ && $prevline =~ /^..*{\s*$/)) {
3198 CHK("BRACES",
3199 "Blank lines aren't necessary after an open brace '{'\n" . $hereprev);
3200 }
3201
3192# no volatiles please 3202# no volatiles please
3193 my $asm_volatile = qr{\b(__asm__|asm)\s+(__volatile__|volatile)\b}; 3203 my $asm_volatile = qr{\b(__asm__|asm)\s+(__volatile__|volatile)\b};
3194 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) { 3204 if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {