[<prev] [next>] [day] [month] [year] [list]
Message-Id: <aeb8be0e54040baceb156b23939cdc568d9d31b9.1456853000.git.joe@perches.com>
Date: Tue, 1 Mar 2016 09:25:02 -0800
From: Joe Perches <joe@...ches.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Andy Whitcroft <apw@...onical.com>
Cc: Jeff Merkey <linux.mdb@...il.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] checkpatch: Exclude asm volatile from complex macro check
asm volatile and all its variants like __asm__ __volatile__ ("<foo>")
are reported as errors with "Macros with with complex values should be
enclosed in parentheses".
Make an exception for these asm volatile macro definitions by converting
the "asm volatile" to "asm_volatile" so it appears as a single function
call and the error isn't reported.
Reported-by: Jeff Merkey <linux.mdb@...il.com>
Signed-off-by: Joe Perches <joe@...ches.com>
---
scripts/checkpatch.pl | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 874132b..aa94e44 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4561,6 +4561,9 @@ sub process {
{
}
+ # Make asm volatile uses seem like a generic function
+ $dstat =~ s/\b_*asm_*\s+_*volatile_*\b/asm_volatile/g;
+
my $exceptions = qr{
$Declare|
module_param_named|
--
2.6.3.368.gf34be46
Powered by blists - more mailing lists