From: Joe Perches Date: Fri, 22 Feb 2013 00:44:14 +0000 (-0800) Subject: checkpatch: warn on unnecessary __dev section markings X-Git-Tag: v3.9-rc1~114^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56e77d709df72eefe50ce97a701bd2d5614d0009;p=platform%2Fkernel%2Flinux-stable.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 f9afd07..3dcfbc9 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);