summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2016-03-15 22:58:01 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-16 00:55:16 +0100
commit42e152931deba7500e756c39e8e2df2e244860f2 (patch)
treee99b1bc10c15d990f8d2cc9bd237a0aa74146c42 /scripts/checkpatch.pl
parentmm: memcontrol: drop unnecessary lru locking from mem_cgroup_migrate() (diff)
downloadlinux-42e152931deba7500e756c39e8e2df2e244860f2.tar.xz
linux-42e152931deba7500e756c39e8e2df2e244860f2.zip
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: Joe Perches <joe@perches.com> Reported-by: Jeff Merkey <linux.mdb@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rwxr-xr-xscripts/checkpatch.pl3
1 files changed, 3 insertions, 0 deletions
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|