diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2008-07-24 00:28:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:25 -0400 |
commit | f3db6639fee577f6ed92c0a1fc881e748c47ec48 (patch) | |
tree | dc6a84609a8838ebbf9d094f4ef67adb32eb10a9 /scripts | |
parent | c8cb2ca37ed51aa1f3b20e3eff1e72df1c400f70 (diff) |
checkpatch: add a checkpatch warning for new uses of __initcall().
[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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 5420db6502fc..cf70f123f574 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -2108,6 +2108,10 @@ sub process { | |||
2108 | if ($line =~ /\bsimple_(strto.*?)\s*\(/) { | 2108 | if ($line =~ /\bsimple_(strto.*?)\s*\(/) { |
2109 | WARN("consider using strict_$1 in preference to simple_$1\n" . $herecurr); | 2109 | WARN("consider using strict_$1 in preference to simple_$1\n" . $herecurr); |
2110 | } | 2110 | } |
2111 | # check for __initcall(), use device_initcall() explicitly please | ||
2112 | if ($line =~ /^.\s*__initcall\s*\(/) { | ||
2113 | WARN("please use device_initcall() instead of __initcall()\n" . $herecurr); | ||
2114 | } | ||
2111 | 2115 | ||
2112 | # use of NR_CPUS is usually wrong | 2116 | # use of NR_CPUS is usually wrong |
2113 | # ignore definitions of NR_CPUS and usage to define arrays as likely right | 2117 | # ignore definitions of NR_CPUS and usage to define arrays as likely right |