lkml.org 
[lkml]   [2013]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] checkpatch: Warn on unnecessary __dev<foo> section markings
On Wed, Jan 02, 2013 at 04:33:21PM -0800, Joe Perches wrote:
> Get people to stop adding __devinit and __devexit section markings.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> scripts/checkpatch.pl | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 4d2c7df..325caa7 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);

That looks simple enough.

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw


\
 
 \ /
  Last update: 2013-01-03 13:42    [W:0.159 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site