From: Joe Perches Date: Tue, 15 Mar 2016 21:58:01 +0000 (-0700) Subject: checkpatch: exclude asm volatile from complex macro check X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=42e152931deba7500e756c39e8e2df2e244860f2;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git checkpatch: exclude asm volatile from complex macro check asm volatile and all its variants like __asm__ __volatile__ ("") 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: Joe Perches Reported-by: Jeff Merkey Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 0147c91fa549..5c00c1c02dab 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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{ $Declare| module_param_named|