* [PATCH] scripts: checkpatch.pl: Fix misused memset detection
@ 2013-01-14 3:04 Cruz Julian Bishop
2013-01-14 3:42 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Cruz Julian Bishop @ 2013-01-14 3:04 UTC (permalink / raw)
To: apw; +Cc: linux-kernel, Cruz Julian Bishop
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] scripts: checkpatch.pl: Fix misused memset detection
2013-01-14 3:04 [PATCH] scripts: checkpatch.pl: Fix misused memset detection Cruz Julian Bishop
@ 2013-01-14 3:42 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2013-01-14 3:42 UTC (permalink / raw)
To: Cruz Julian Bishop; +Cc: apw, linux-kernel
On Mon, 2013-01-14 at 13:04 +1000, Cruz Julian Bishop wrote:
> Previously, checking memset declarations would generate
> a lot of errors saying that $ms_size was not defined.
Try this one instead:
https://lkml.org/lkml/2013/1/10/444
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-14 3:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-14 3:04 [PATCH] scripts: checkpatch.pl: Fix misused memset detection Cruz Julian Bishop
2013-01-14 3:42 ` Joe Perches
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®