From: Joe Perches Date: Fri, 22 Feb 2013 00:44:14 +0000 (-0800) Subject: checkpatch: warn on unnecessary __dev section markings X-Git-Tag: MMI-PSA29.97-13-9~14988^2~49 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=56e77d709df72eefe50ce97a701bd2d5614d0009;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git checkpatch: warn on unnecessary __dev section markings Get people to stop adding __devinit and __devexit section markings. Signed-off-by: Joe Perches Acked-by: Andy Whitcroft Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f9afd075e109..3dcfbc9c6db4 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1931,6 +1931,12 @@ sub process { "use the SSYNC() macro in asm/blackfin.h\n" . $herevet); } +# check for old HOTPLUG __dev section markings + if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) { + WARN("HOTPLUG_SECTION", + "Using $1 is unnecessary\n" . $herecurr); + } + # Check for potential 'bare' types my ($stat, $cond, $line_nr_next, $remain_next, $off_next, $realline_next);