Skip to content

Commit

Permalink
checkpatch: make in_atomic ok in the core
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Whitcroft authored and torvalds committed Feb 28, 2009
1 parent cbb7667 commit f4a8773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit f4a8773

Please sign in to comment.