diff options
author | Joe Perches <joe@perches.com> | 2013-02-21 19:44:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:22:26 -0500 |
commit | 56e77d709df72eefe50ce97a701bd2d5614d0009 (patch) | |
tree | 6aaed6701b4dc7db919dd345afb9181466fbd277 /scripts/checkpatch.pl | |
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 <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>
Diffstat (limited to 'scripts/checkpatch.pl')
-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 { | |||
1931 | "use the SSYNC() macro in asm/blackfin.h\n" . $herevet); | 1931 | "use the SSYNC() macro in asm/blackfin.h\n" . $herevet); |
1932 | } | 1932 | } |
1933 | 1933 | ||
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 | |||
1934 | # Check for potential 'bare' types | 1940 | # Check for potential 'bare' types |
1935 | my ($stat, $cond, $line_nr_next, $remain_next, $off_next, | 1941 | my ($stat, $cond, $line_nr_next, $remain_next, $off_next, |
1936 | $realline_next); | 1942 | $realline_next); |