aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2020-05-08 14:58:28 +0200
committerThomas Gleixner <tglx@linutronix.de>2020-05-08 14:58:28 +0200
commit97a9474aeb789183a1d0712e66a4283860279ac9 (patch)
tree4cd94285ef4a8e81c8d2e28f7dc9923cb60014e4 /scripts/checkpatch.pl
parentMerge tag 'v5.7-rc1' into locking/kcsan, to resolve conflicts and refresh (diff)
parentobjtool, kcsan: Add kcsan_disable_current() and kcsan_enable_current_nowarn() (diff)
downloadlinux-dev-97a9474aeb789183a1d0712e66a4283860279ac9.tar.xz
linux-dev-97a9474aeb789183a1d0712e66a4283860279ac9.zip
Merge branch 'kcsan-for-tip' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/kcsan
Pull KCSAN updates from Paul McKenney.
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d64c67b67e3c..083350e0e337 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5890,6 +5890,14 @@ sub process {
}
}
+# check for data_race without a comment.
+ if ($line =~ /\bdata_race\s*\(/) {
+ if (!ctx_has_comment($first_line, $linenr)) {
+ WARN("DATA_RACE",
+ "data_race without comment\n" . $herecurr);
+ }
+ }
+
# check for smp_read_barrier_depends and read_barrier_depends
if (!$file && $line =~ /\b(smp_|)read_barrier_depends\s*\(/) {
WARN("READ_BARRIER_DEPENDS",