From: Joe Perches Date: Fri, 22 Feb 2013 00:44:14 +0000 (-0800) Subject: checkpatch: warn on unnecessary __dev section markings X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=56e77d709df72eefe50ce97a701bd2d5614d0009;p=openwrt%2Fstaging%2Fblogic.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);