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]
Date:	Mon, 12 Jul 2010 12:03:01 -0700
From:	Joe Perches <joe@...ches.com>
To:	Larry Finger <Larry.Finger@...inger.net>
Cc:	Andy Whitcroft <apw@...onical.com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: Possible false positive from checkpatch.pl

On Mon, 2010-07-12 at 13:35 -0500, Larry Finger wrote:
> These are ugly macros that will be eliminated, but for the moment they are in 
> the code. As I stated in my original email, removing the comma from the 
> definition and adding it to the code does fix the checkpatch error, but it 
> should not be necessary.

Hi Larry.

Using checkpatch is not necessary.

If you want generally conforming kernel style,
the macro should not end in a trailing comma.

Feel free to ignore the checkpatch message,

I think the warning is reasonable, though it
could be made more specific.

cheers, Joe

Maybe something like:
---
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index bd88f11..7e8a3f4 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2394,8 +2394,10 @@ sub process {
 			}x;
 			#print "REST<$rest> dstat<$dstat>\n";
 			if ($rest ne '') {
-				if ($rest !~ /while\s*\(/ &&
-				    $dstat !~ /$exceptions/)
+				if ($rest eq ",") {
+					ERROR("Macros should not end with a trailing comma\n" . "$here\n$ctx\n");
+				} elsif ($rest !~ /while\s*\(/ &&
+					 $dstat !~ /$exceptions/)
 				{
 					ERROR("Macros with multiple statements should be enclosed in a do - while loop\n" . "$here\n$ctx\n");
 				}



--
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