diff options
author | Andy Whitcroft <apw@canonical.com> | 2009-02-27 17:03:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-27 19:26:21 -0500 |
commit | f4a8773676c21a68b0666fbe48af4fe1af89dfa9 (patch) | |
tree | 1ae344b48e791f3abf9310ec71bb15ddd72b2ae1 /scripts/checkpatch.pl | |
parent | cbb766766f3f2f6d9326c561b1020590642c6e39 (diff) |
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>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 2 |
1 files changed, 1 insertions, 1 deletions
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 { | |||
2560 | if ($line =~ /\bin_atomic\s*\(/) { | 2560 | if ($line =~ /\bin_atomic\s*\(/) { |
2561 | if ($realfile =~ m@^drivers/@) { | 2561 | if ($realfile =~ m@^drivers/@) { |
2562 | ERROR("do not use in_atomic in drivers\n" . $herecurr); | 2562 | ERROR("do not use in_atomic in drivers\n" . $herecurr); |
2563 | } else { | 2563 | } elsif ($realfile !~ m@^kernel/@) { |
2564 | WARN("use of in_atomic() is incorrect outside core kernel code\n" . $herecurr); | 2564 | WARN("use of in_atomic() is incorrect outside core kernel code\n" . $herecurr); |
2565 | } | 2565 | } |
2566 | } | 2566 | } |