]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - scripts/checkpatch.pl
checkpatch: struct seq_operations should normally be const
[linux-2.6-omap-h63xx.git] / scripts / checkpatch.pl
index 5ea55e330c2444bdc8a18166a094801909a77ae1..447435c33dd5699ff6375d45978e3d992b630fe5 100755 (executable)
@@ -2527,9 +2527,10 @@ sub process {
                        WARN("please use device_initcall() instead of __initcall()\n" . $herecurr);
                }
 # check for struct file_operations, ensure they are const.
-               if ($line =~ /\bstruct\s+file_operations\b/ &&
-                   $line !~ /\bconst\b/) {
-                       WARN("struct file_operations should normally be const\n" . $herecurr);
+               if ($line !~ /\bconst\b/ &&
+                   $line =~ /\bstruct\s+(file_operations|seq_operations)\b/) {
+                       WARN("struct $1 should normally be const\n" .
+                               $herecurr);
                }
 
 # use of NR_CPUS is usually wrong