From: Andy Whitcroft Date: Fri, 27 Feb 2009 22:03:05 +0000 (-0800) Subject: checkpatch: make in_atomic ok in the core X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f4a8773676c21a68b0666fbe48af4fe1af89dfa9;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git checkpatch: make in_atomic ok in the core We say that in_atomic() is ok in the core kernel, but then always report it regardless of where in the kernel it is. Keep quiet if it is used in kernel/*. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 45eb0ae98eba..c71a0fae84df 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2560,7 +2560,7 @@ sub process { if ($line =~ /\bin_atomic\s*\(/) { if ($realfile =~ m@^drivers/@) { ERROR("do not use in_atomic in drivers\n" . $herecurr); - } else { + } elsif ($realfile !~ m@^kernel/@) { WARN("use of in_atomic() is incorrect outside core kernel code\n" . $herecurr); } }