[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1358132679-12235-1-git-send-email-cruzjbishop@gmail.com>
Date: Mon, 14 Jan 2013 13:04:39 +1000
From: Cruz Julian Bishop <cruzjbishop@...il.com>
To: apw@...onical.com
Cc: linux-kernel@...r.kernel.org,
Cruz Julian Bishop <cruzjbishop@...il.com>
Subject: [PATCH] scripts: checkpatch.pl: Fix misused memset detection
Previously, checking memset declarations would generate
a lot of errors saying that $ms_size was not defined.
This commit fixes that.
Signed-off-by: Cruz Julian Bishop <cruzjbishop@...il.com>
---
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 519a2d9..0b927ab 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3377,8 +3377,8 @@ sub process {
$stat =~ /^\+(?:.*?)\bmemset\s*\(\s*$FuncArg\s*,\s*$FuncArg\s*\,\s*$FuncArg\s*\)/s) {
my $ms_addr = $2;
- my $ms_val = $7;
- my $ms_size = $12;
+ my $ms_val = $8;
+ my $ms_size = $14;
if ($ms_size =~ /^(0x|)0$/i) {
ERROR("MEMSET",
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists