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....@gmail.com> Signed-off-by: Joe Perches <j...@perches.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