+ checkpatch-improve-seq_print-seq_puts-suggestion.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: checkpatch: improve seq_print->seq_puts suggestion
has been added to the -mm tree.  Its filename is
     checkpatch-improve-seq_print-seq_puts-suggestion.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-improve-seq_print-seq_puts-suggestion.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-improve-seq_print-seq_puts-suggestion.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Heba Aamer <heba93aamer@xxxxxxxxx>
Subject: checkpatch: improve seq_print->seq_puts suggestion

Improve the format specifier test by removing any %% before looking for
any remaining % format specifier.

Signed-off-by: Heba Aamer <heba93aamer@xxxxxxxxx>
Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 scripts/checkpatch.pl |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN scripts/checkpatch.pl~checkpatch-improve-seq_print-seq_puts-suggestion scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-improve-seq_print-seq_puts-suggestion
+++ a/scripts/checkpatch.pl
@@ -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) {
_

Patches currently in -mm which might be from heba93aamer@xxxxxxxxx are

checkpatch-improve-seq_print-seq_puts-suggestion.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux