* [merged] checkpatch-add-strict-messages-for-blank-lines-around-braces.patch removed from -mm tree
@ 2012-12-18 20:10 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2012-12-18 20:10 UTC (permalink / raw)
To: joe, apw, mm-commits
The patch titled
Subject: checkpatch: Add --strict messages for blank lines around braces
has been removed from the -mm tree. Its filename was
checkpatch-add-strict-messages-for-blank-lines-around-braces.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Joe Perches <joe@perches.com>
Subject: checkpatch: Add --strict messages for blank lines around braces
Blank lines around braces are not unnecessary. Emit a message on the use
of these blank lines only when using --strict.
int foo(int bar)
{
something or other....
}
is generally written in the kernel as:
int foo(int bar)
{
something or other...
}
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
scripts/checkpatch.pl | 10 ++++++++++
1 file changed, 10 insertions(+)
diff -puN scripts/checkpatch.pl~checkpatch-add-strict-messages-for-blank-lines-around-braces scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-add-strict-messages-for-blank-lines-around-braces
+++ a/scripts/checkpatch.pl
@@ -3189,6 +3189,16 @@ sub process {
}
}
+# check for unnecessary blank lines around braces
+ if (($line =~ /^..*}\s*$/ && $prevline =~ /^.\s*$/)) {
+ CHK("BRACES",
+ "Blank lines aren't necessary before a close brace '}'\n" . $hereprev);
+ }
+ if (($line =~ /^.\s*$/ && $prevline =~ /^..*{\s*$/)) {
+ CHK("BRACES",
+ "Blank lines aren't necessary after an open brace '{'\n" . $hereprev);
+ }
+
# no volatiles please
my $asm_volatile = qr{\b(__asm__|asm)\s+(__volatile__|volatile)\b};
if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
_
Patches currently in -mm which might be from joe@perches.com are
origin.patch
linux-next.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-12-18 20:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-18 20:10 [merged] checkpatch-add-strict-messages-for-blank-lines-around-braces.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox