Commit 42e15293 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

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.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Reported-by: default avatarJeff Merkey <linux.mdb@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9cf7666a
...@@ -4560,6 +4560,9 @@ sub process { ...@@ -4560,6 +4560,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{ my $exceptions = qr{
$Declare| $Declare|
module_param_named| module_param_named|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment