Skip to content

Commit ae3ccc4

Browse files
Fabian Fredericktorvalds
authored andcommitted
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 <fabf@skynet.be> Cc: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 9b3189e commit ae3ccc4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎scripts/checkpatch.pl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4551,10 +4551,10 @@ sub process {
45514551
"$1 is obsolete, use k$3 instead\n" . $herecurr);
45524552
}
45534553

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

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

0 commit comments

Comments
 (0)