From 2852a7f2d89b9199d5769fa1106cb1550169f6ab Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Tue, 6 Jan 2009 14:41:16 -0800 Subject: [PATCH] --- yaml --- r: 126299 b: refs/heads/master c: 691d77b6b85c20e4166bafd12bd0131b28f95a16 h: refs/heads/master i: 126297: c385e7137d8ae574b33a6299ba0ebb58ead2f222 126295: 6b02f495c2c5a2b82011b77b5b976bf24f559a4b v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index b0a1a2d36350..3e0f46ed635b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 94e2959e7a6a4ef0969932c30349ce6f4469a3cf +refs/heads/master: 691d77b6b85c20e4166bafd12bd0131b28f95a16 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index f88bb3e21cda..826cdbac0114 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -2466,6 +2466,15 @@ sub process { last; } } + +# whine mightly about in_atomic + if ($line =~ /\bin_atomic\s*\(/) { + if ($realfile =~ m@^drivers/@) { + ERROR("do not use in_atomic in drivers\n" . $herecurr); + } else { + WARN("use of in_atomic() is incorrect outside core kernel code\n" . $herecurr); + } + } } # If we have no input at all, then there is nothing to report on