From e984de29d3324742979a1a74aa5e2b919c39c153 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 20 Feb 2013 13:15:34 +1100 Subject: [PATCH] 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 --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.39.5