Merge branch 'i2c/for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
[linux-2.6-microblaze.git] / scripts / checkpatch.pl
index e23c912..4c82060 100755 (executable)
@@ -5945,6 +5945,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",