From: Michael Ellerman Date: Thu, 24 Jul 2008 04:28:57 +0000 (-0700) Subject: checkpatch: add a checkpatch warning for new uses of __initcall(). X-Git-Tag: upstream/snapshot3+hdmi~23998 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3db6639fee577f6ed92c0a1fc881e748c47ec48;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git checkpatch: add a checkpatch warning for new uses of __initcall(). [apw@shadowen.org: generalise pattern and add tests] Signed-off-by: Michael Ellerman Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 5420db6..cf70f12 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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