Merge branch 'access-creds'
[linux-2.6-block.git] / scripts / checkpatch.pl
index a6d436809bf561f3604c1e7d1f4f42e8224ed376..93a7edfe0f0592b988651bedcd3aa180b1e63a77 100755 (executable)
@@ -6639,6 +6639,12 @@ sub process {
                                     "unknown module license " . $extracted_string . "\n" . $herecurr);
                        }
                }
+
+# check for sysctl duplicate constants
+               if ($line =~ /\.extra[12]\s*=\s*&(zero|one|int_max)\b/) {
+                       WARN("DUPLICATED_SYSCTL_CONST",
+                               "duplicated sysctl range checking value '$1', consider using the shared one in include/linux/sysctl.h\n" . $herecurr);
+               }
        }
 
        # If we have no input at all, then there is nothing to report on