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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081024115010.GA31761@basil.nowhere.org>
Date:	Fri, 24 Oct 2008 13:50:10 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	apw@...dowen.org, linux-kernel@...r.kernel.org
Subject: [PATCH] Handle space after for_each_* macros gracefully in checkpatch

Handle space after for_each_* macros gracefully in checkpatch.pl

Anyone else seeing the irony of checkpatch.pl recommending to 
use for_each_cpu_mask, but then not actually parsing it
correctly.

When you write 

	for_each_cpu_mask (...) { 

it would complain about the space between mask and the open bracket
because it thinks it's a normal function call.

Fix this in a generic way. In theory someone could construct
a normal function that starts with for_each_* and it would
not warn, but I think that would be uncommon. The alternative
of listing all macros was tried first, but turned out to 
be unwieldly.

I think I covered most of the common ones available, the
only exceptions are a few oddballs with leading prefix 
like pnp_for_each* or zorro_for_each.

Signed-off-by: Andi Kleen <ak@...ux.intel.com>

Index: linux-2.6.27-misc/scripts/checkpatch.pl
===================================================================
--- linux-2.6.27-misc.orig/scripts/checkpatch.pl
+++ linux-2.6.27-misc/scripts/checkpatch.pl
@@ -1513,6 +1513,7 @@ sub process {
 				if|for|while|switch|return|case|
 				volatile|__volatile__|
 				__attribute__|format|__extension__|
+				([ph]?list_)?for_each_[a-z_]+|
 				asm|__asm__)$/x)
 			{
 
--
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