checkpatch: improve seq_print->seq_puts suggestion
[linux-2.6-block.git] / scripts / checkpatch.pl
index 059c032d8882c12fff84de65a505ae525e1d45d4..7f1804e052f2b4ba1f05fec697a14576d544187b 100755 (executable)
@@ -4854,7 +4854,8 @@ sub process {
 # check for seq_printf uses that could be seq_puts
                if ($sline =~ /\bseq_printf\s*\(.*"\s*\)\s*;\s*$/) {
                        my $fmt = get_quoted_string($line, $rawline);
-                       if ($fmt ne "" && $fmt !~ /[^\\]\%/) {
+                       $fmt =~ s/%%//g;
+                       if ($fmt !~ /%/) {
                                if (WARN("PREFER_SEQ_PUTS",
                                         "Prefer seq_puts to seq_printf\n" . $herecurr) &&
                                    $fix) {