lkml.org 
[lkml]   [2013]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] scripts: checkpatch.pl: Fix misused memset detection
Date
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


\
 
 \ /
  Last update: 2013-01-14 04:41    [W:0.030 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site