diff options
author | Joe Perches <joe@perches.com> | 2013-09-25 02:27:46 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-25 04:00:26 +0400 |
commit | d1d85780dd30e137d8ff505c1c2e79eaf729853d (patch) | |
tree | 5688d52d88f6a97b7b8ae26afa1f58ac10dd9347 /scripts/checkpatch.pl | |
parent | 58f09e00ae095e46ef9edfcf3a5fd9ccdfad065e (diff) | |
download | linux-d1d85780dd30e137d8ff505c1c2e79eaf729853d.tar.xz |
checkpatch: make extern in .h prototypes quieter
The use of extern in .h files is a bit contentious.
Make the warning be emitted only when --strict is used on the command
line.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 47016c304c84..66cad506b8a2 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3975,8 +3975,8 @@ sub string_find_replace { # 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\b\s*(.*)/$1$2/; } |