diff options
author | Joe Perches <[email protected]> | 2013-02-21 16:44:14 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2013-02-21 17:22:26 -0800 |
commit | 56e77d709df72eefe50ce97a701bd2d5614d0009 (patch) | |
tree | 6aaed6701b4dc7db919dd345afb9181466fbd277 | |
parent | dc1393130b026908c54d4538abbb5c2badbfabbe (diff) |
checkpatch: warn on unnecessary __dev<foo> section markings
Get people to stop adding __devinit and __devexit section markings.
Signed-off-by: Joe Perches <[email protected]>
Acked-by: Andy Whitcroft <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 6 insertions, 0 deletions
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<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 my ($stat, $cond, $line_nr_next, $remain_next, $off_next, $realline_next); |