]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
checkpatch: add a checkpatch warning for new uses of __initcall().
authorMichael Ellerman <michael@ellerman.id.au>
Thu, 24 Jul 2008 04:28:57 +0000 (21:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:25 +0000 (10:47 -0700)
[apw@shadowen.org: generalise pattern and add tests]
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 5420db6502fce93875f8fd049535c97c95b101f1..cf70f123f574aad3dd293b3b612f6fead6e75bf0 100755 (executable)
@@ -2108,6 +2108,10 @@ sub process {
                if ($line =~ /\bsimple_(strto.*?)\s*\(/) {
                        WARN("consider using strict_$1 in preference to simple_$1\n" . $herecurr);
                }
+# check for __initcall(), use device_initcall() explicitly please
+               if ($line =~ /^.\s*__initcall\s*\(/) {
+                       WARN("please use device_initcall() instead of __initcall()\n" . $herecurr);
+               }
 
 # use of NR_CPUS is usually wrong
 # ignore definitions of NR_CPUS and usage to define arrays as likely right