diff options
| author | Ingo Molnar <mingo@elte.hu> | 2011-05-26 07:51:31 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2011-05-26 07:51:35 -0400 |
| commit | de66ee979d0ea45171cc2501750e9f9f22f5a690 (patch) | |
| tree | 5ab1a5c6b596b9b786902fb380274e1e1f4ceb13 /scripts/checkpatch.pl | |
| parent | 916f676f8dc016103f983c7ec54c18ecdbb6e349 (diff) | |
| parent | 4db70f73e56961b9bcdfd0c36c62847a18b7dbb5 (diff) | |
Merge branch 'linus' into x86/urgent
Merge reason: we want to queue up a dependent patch.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d8670810db65..8657f99bfb2b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
| @@ -210,10 +210,10 @@ our $typeTypedefs = qr{(?x: | |||
| 210 | 210 | ||
| 211 | our $logFunctions = qr{(?x: | 211 | our $logFunctions = qr{(?x: |
| 212 | printk| | 212 | printk| |
| 213 | pr_(debug|dbg|vdbg|devel|info|warning|err|notice|alert|crit|emerg|cont)| | 213 | [a-z]+_(emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)| |
| 214 | (dev|netdev|netif)_(printk|dbg|vdbg|info|warn|err|notice|alert|crit|emerg|WARN)| | ||
| 215 | WARN| | 214 | WARN| |
| 216 | panic | 215 | panic| |
| 216 | MODULE_[A-Z_]+ | ||
| 217 | )}; | 217 | )}; |
| 218 | 218 | ||
| 219 | our @typeList = ( | 219 | our @typeList = ( |
| @@ -1462,7 +1462,7 @@ sub process { | |||
| 1462 | #80 column limit | 1462 | #80 column limit |
| 1463 | if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && | 1463 | if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && |
| 1464 | $rawline !~ /^.\s*\*\s*\@$Ident\s/ && | 1464 | $rawline !~ /^.\s*\*\s*\@$Ident\s/ && |
| 1465 | !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ || | 1465 | !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:|,|\)\s*;)\s*$/ || |
| 1466 | $line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) && | 1466 | $line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) && |
| 1467 | $length > 80) | 1467 | $length > 80) |
| 1468 | { | 1468 | { |
| @@ -2748,6 +2748,11 @@ sub process { | |||
| 2748 | WARN("sizeof(& should be avoided\n" . $herecurr); | 2748 | WARN("sizeof(& should be avoided\n" . $herecurr); |
| 2749 | } | 2749 | } |
| 2750 | 2750 | ||
| 2751 | # check for line continuations in quoted strings with odd counts of " | ||
| 2752 | if ($rawline =~ /\\$/ && $rawline =~ tr/"/"/ % 2) { | ||
| 2753 | WARN("Avoid line continuations in quoted strings\n" . $herecurr); | ||
| 2754 | } | ||
| 2755 | |||
| 2751 | # check for new externs in .c files. | 2756 | # check for new externs in .c files. |
| 2752 | if ($realfile =~ /\.c$/ && defined $stat && | 2757 | if ($realfile =~ /\.c$/ && defined $stat && |
| 2753 | $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s) | 2758 | $stat =~ /^.\s*(?:extern\s+)?$Type\s+($Ident)(\s*)\(/s) |
