mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
dc1393130b
commit
56e77d709d
|
@ -1931,6 +1931,12 @@ sub process {
|
||||||
"use the SSYNC() macro in asm/blackfin.h\n" . $herevet);
|
"use the SSYNC() macro in asm/blackfin.h\n" . $herevet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# check for old HOTPLUG __dev<foo> 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
|
# Check for potential 'bare' types
|
||||||
my ($stat, $cond, $line_nr_next, $remain_next, $off_next,
|
my ($stat, $cond, $line_nr_next, $remain_next, $off_next,
|
||||||
$realline_next);
|
$realline_next);
|
||||||
|
|
Loading…
Reference in New Issue