Эх сурвалжийг харах

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 <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andy Whitcroft 16 жил өмнө
parent
commit
f4a8773676
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      scripts/checkpatch.pl

+ 1 - 1
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);
 			}
 		}