lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120130111817.GA18810@localhost>
Date:	Mon, 30 Jan 2012 11:18:17 +0000
From:	Andy Whitcroft <apw@...onical.com>
To:	Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: checkpatch.pl: WxV false positive

On Sun, Jan 22, 2012 at 09:48:34PM -0500, Vivien Didelot wrote:

> In the code below, checkpatch thinks that the asterisk is a
> multiplication, so it is complaining about coding style.
> 
>     ERROR: need consistent spacing around '*' (ctx:WxV)
>     #304: FILE: x86/platform/ts5500/ts5500_adc.c:304:
>     +	.attrs = (struct attribute *[]) {

C types are the pits.  How does the version below handle for you:

    http://people.canonical.com/~apw/checkpatch/checkpatch-next.pl

Relative patch below.

-apw

commit f8a73045dcaac70f9be770cca06f21c762a13878
Author: Andy Whitcroft <apw@...onical.com>
Date:   Sun Jan 29 21:46:04 2012 +0000

    checkpatch: add [] to type extensions
    
    Add [] to a type extensions.  Fixes false positives on:
    
        .attrs = (struct attribute *[]) {
    
    Signed-off-by: Andy Whitcroft <apw@...onical.com>

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d1dd544..64de1bd 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -323,7 +323,7 @@ sub build_types {
 		  }x;
 	$Type	= qr{
 			$NonptrType
-			(?:[\s\*]+\s*const|[\s\*]+|(?:\s*\[\s*\])+)?
+			(?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)?
 			(?:\s+$Inline|\s+$Modifier)*
 		  }x;
 	$Declare	= qr{(?:$Storage\s+)?$Type};
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ