[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1196390128.22120.118.camel@localhost>
Date: Thu, 29 Nov 2007 18:35:28 -0800
From: Joe Perches <joe@...ches.com>
To: Li Zefan <lizf@...fujitsu.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Frans Pop <elendil@...net.nl>, linux-kernel@...r.kernel.org,
tglx@...utronix.de, trivial@...nel.org,
Andy Whitcroft <apw@...dowen.org>,
Randy Dunlap <rdunlap@...otime.net>,
Joel Schopp <jschopp@...tin.ibm.com>
Subject: Re: Trailing periods in kernel messages
On Fri, 2007-11-30 at 09:54 +0800, Li Zefan wrote:
> So it doesn't deserve the effort to eliminate these periods, isn't it?
I hope these will eventually disappear.
> Or we can add a check to checkpatch.pl to prevent new ones.
Perhaps that's a good idea.
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index cbb4258..707f84c 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1390,6 +1390,10 @@ sub process {
if ($line =~ /\*\s*\)\s*k[czm]alloc\b/) {
WARN("unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr);
}
+
+ if ($rawline =~ /(print|pr_(emerg|alert|crit|err|warning|notice|info|debug)).*\.\\n\"/) {
+ WARN("unnecessary period before newline\n" . $herecurr);
+ }
}
if ($chk_patch && !$is_patch) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists