]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - scripts/checkpatch.pl
binderfs: add gitignore for generated sample program
[mirror_ubuntu-jammy-kernel.git] / scripts / checkpatch.pl
index e23c912548f5e580eefb5d9cac5f08b2514df145..4c820607540bf646f8defa5417876a987c1bc74d 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",