From ae3ccc4678fec2d270a4c54981831c7b8a2da9cd Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Wed, 4 Jun 2014 16:12:10 -0700 Subject: [PATCH] scripts/checkpatch.pl: device_initcall is not the only __initcall substitute This patch adds a link to init.h to find appropriate initcall function to replace obsolete __initcall Signed-off-by: Fabian Frederick Cc: Andy Whitcroft Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 0ef4ae1de8ee..010b18ef4ea0 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4551,10 +4551,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. -- 2.20.1