[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1377583247.2658.13.camel@joe-AO722>
Date: Mon, 26 Aug 2013 23:00:47 -0700
From: Joe Perches <joe@...ches.com>
To: Mike Frysinger <vapier@...too.org>
Cc: Jiri Kosina <trivial@...nel.org>,
"James E.J. Bottomley" <jejb@...isc-linux.org>,
Helge Deller <deller@....de>,
John Stultz <john.stultz@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
Daniele Venzano <venza@...wnhat.org>,
Andi Kleen <andi@...stfloor.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, linux-mm@...ck.org,
alsa-devel <alsa-devel@...a-project.org>
Subject: Re: [trivial PATCH] treewide: Fix printks with 0x%#
On Tue, 2013-08-27 at 01:39 -0400, Mike Frysinger wrote:
> On Thursday 25 July 2013 14:53:25 Joe Perches wrote:
> > Using 0x%# emits 0x0x. Only one is necessary.
>
> sounds like a job for checkpatch.pl :)
Here. Submit it yourself...
---
scripts/checkpatch.pl | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9ba4fc4..520f8e7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3869,6 +3869,18 @@ sub process {
}
}
+# check for formats with "0x%#"
+ if ($line =~ /"X*"/) {
+ my $fmt = get_quoted_string($line, $rawline);
+ if ($fmt =~ /0x%#/) {
+ if (WARN("REDUNDANT_HEX",
+ "Redundant hex prefix 0x format\n" . $herecurr) &&
+ $fix) {
+ $fixed[$linenr - 1] =~ s/0x%#/%#/g;
+ }
+ }
+ }
+
# Check for misused memsets
if ($^V && $^V ge 5.10.0 &&
defined $stat &&
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists