aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/checkpatch.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c03e4278b07c..42567bcd66b2 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -323,7 +323,8 @@ our $logFunctions = qr{(?x:
323 (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)| 323 (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
324 WARN(?:_RATELIMIT|_ONCE|)| 324 WARN(?:_RATELIMIT|_ONCE|)|
325 panic| 325 panic|
326 MODULE_[A-Z_]+ 326 MODULE_[A-Z_]+|
327 seq_vprintf|seq_printf|seq_puts
327)}; 328)};
328 329
329our $signature_tags = qr{(?xi: 330our $signature_tags = qr{(?xi:
@@ -3909,9 +3910,9 @@ sub string_find_replace {
3909 } 3910 }
3910 3911
3911# check for seq_printf uses that could be seq_puts 3912# check for seq_printf uses that could be seq_puts
3912 if ($line =~ /\bseq_printf\s*\(/) { 3913 if ($sline =~ /\bseq_printf\s*\(.*"\s*\)\s*;\s*$/) {
3913 my $fmt = get_quoted_string($line, $rawline); 3914 my $fmt = get_quoted_string($line, $rawline);
3914 if ($fmt !~ /[^\\]\%/) { 3915 if ($fmt ne "" && $fmt !~ /[^\\]\%/) {
3915 if (WARN("PREFER_SEQ_PUTS", 3916 if (WARN("PREFER_SEQ_PUTS",
3916 "Prefer seq_puts to seq_printf\n" . $herecurr) && 3917 "Prefer seq_puts to seq_printf\n" . $herecurr) &&
3917 $fix) { 3918 $fix) {