From: Cruz Julian Bishop <cruzjbishop@gmail.com>
To: apw@canonical.com
Cc: linux-kernel@vger.kernel.org, Cruz Julian Bishop <cruzjbishop@gmail.com>
Subject: [PATCH] scripts: checkpatch.pl: Fix misused memset detection
Date: Mon, 14 Jan 2013 13:04:39 +1000 [thread overview]
Message-ID: <1358132679-12235-1-git-send-email-cruzjbishop@gmail.com> (raw)
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@gmail.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
next reply other threads:[~2013-01-14 3:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 3:04 Cruz Julian Bishop [this message]
2013-01-14 3:42 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358132679-12235-1-git-send-email-cruzjbishop@gmail.com \
--to=cruzjbishop@gmail.com \
--cc=apw@canonical.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®