[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1378138904.1953.72.camel@joe-AO722>
Date: Mon, 02 Sep 2013 09:21:44 -0700
From: Joe Perches <joe@...ches.com>
To: David Howells <dhowells@...hat.com>
Cc: akpm@...ux-foundation.org, hannes@...essinduktion.org,
linux-kernel@...r.kernel.org, dwmw2@...radead.org
Subject: [PATCH] checkpatch: Make extern in .h prototypes quieter.
The use of extern in .h files is a bit contentious.
Make it emitted only when --strict is used on the
command-line.
Signed-off-by: Joe Perches <joe@...ches.com>
---
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9bb056c..13165ea 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3927,8 +3927,8 @@ sub process {
# check for new externs in .h files.
if ($realfile =~ /\.h$/ &&
$line =~ /^\+\s*(extern\s+)$Type\s*$Ident\s*\((?!\s*\*)/) {
- if (WARN("AVOID_EXTERNS",
- "extern prototypes should be avoided in .h files\n" . $herecurr) &&
+ if (CHK("AVOID_EXTERNS",
+ "extern prototypes should be avoided in .h files\n" . $herecurr) &&
$fix) {
$fixed[$linenr - 1] =~ s/(.*)\bextern\s+(.*)/$1$2/;
}
--
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