2014-06-03 04:58:41

by Fabian Frédérick

[permalink] [raw]
Subject: [PATCH V2] scripts/checkpatch.pl: device_initcall is not the only __initcall substitute

This patch adds a link to init.h to find accurate initcall function
to replace obsolete __initcall

Cc: Andy Whitcroft <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: Fabian Frederick <[email protected]>
---
V2: s/accurate/appropriate
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 34eb216..ee28107 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4443,10 +4443,10 @@ sub process {
"$1 is obsolete, use k$3 instead\n" . $herecurr);
}

-# check for __initcall(), use device_initcall() explicitly please
+# check for __initcall(), use device_initcall() explicitly or more appropriate function please
if ($line =~ /^.\s*__initcall\s*\(/) {
WARN("USE_DEVICE_INITCALL",
- "please use device_initcall() instead of __initcall()\n" . $herecurr);
+ "please use device_initcall() or more appropriate function instead of __initcall() (see include/linux/init.h)\n" . $herecurr);
}

# check for various ops structs, ensure they are const.
--
1.8.4.5