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.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -4560,6 +4560,9 @@ sub process { · 4559 unmodified lines | ||
| 4560 | 4560 | { |
| 4561 | 4561 | } |
| 4562 | 4562 | |
| 4563 | + # Make asm volatile uses seem like a generic function | |
| 4564 | + $dstat =~ s/\b_*asm_*\s+_*volatile_*\b/asm_volatile/g; | |
| 4565 | + | |
| 4563 | 4566 | my $exceptions = qr{ |
| 4564 | 4567 | $Declare| |
| 4565 | 4568 | module_param_named| |