History

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.

Joe Perches committed 10 years ago

Commit 42e15291 parent 9cf76661 file · +3 −0Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+3−0
@@ -4560,6 +4560,9 @@ sub process { · 4559 unmodified lines
45604560 {
45614561 }
45624562
4563+ # Make asm volatile uses seem like a generic function
4564+ $dstat =~ s/\b_*asm_*\s+_*volatile_*\b/asm_volatile/g;
4565+
45634566 my $exceptions = qr{
45644567 $Declare|
45654568 module_param_named|