Skip to content

Commit 56e77d7

Browse files
JoePerchestorvalds
authored andcommitted
checkpatch: warn on unnecessary __dev<foo> section markings
Get people to stop adding __devinit and __devexit section markings. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Andy Whitcroft <apw@canonical.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent dc13931 commit 56e77d7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎scripts/checkpatch.pl‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,6 +1931,12 @@ sub process {
19311931
"use the SSYNC() macro in asm/blackfin.h\n" . $herevet);
19321932
}
19331933

1934+
# check for old HOTPLUG __dev<foo> section markings
1935+
if ($line =~ /\b(__dev(init|exit)(data|const|))\b/) {
1936+
WARN("HOTPLUG_SECTION",
1937+
"Using $1 is unnecessary\n" . $herecurr);
1938+
}
1939+
19341940
# Check for potential 'bare' types
19351941
my ($stat, $cond, $line_nr_next, $remain_next, $off_next,
19361942
$realline_next);

0 commit comments

Comments
 (0)