The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Whitcroft <apw@canonical.com>, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] checkpatch: Warn on unnecessary __dev<foo> section markings
Date: Wed, 02 Jan 2013 16:33:21 -0800	[thread overview]
Message-ID: <1357173201.25181.22.camel@joe-AO722> (raw)
In-Reply-To: <20130102160935.ec405bc4.akpm@linux-foundation.org>

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);



  parent reply	other threads:[~2013-01-03  0:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-02 23:27 [PATCH v8 1/3] aerdrv: Trace Event for AER Lance Ortiz
2013-01-02 23:27 ` [PATCH v8 2/3] aerdrv: Enhanced AER logging Lance Ortiz
2013-01-02 23:27 ` [PATCH v8 3/3] aerdrv: Cleanup log output for AER Lance Ortiz
2013-01-02 23:27   ` Joe Perches
2013-01-02 23:41     ` Tony Luck
2013-01-03 15:51       ` Borislav Petkov
2013-01-03  0:06   ` [PATCH] checkpatch: prefer dev_<level>( to dev_printk(KERN_<LEVEL> Joe Perches
     [not found]     ` <20130102160935.ec405bc4.akpm@linux-foundation.org>
2013-01-03  0:33       ` Joe Perches [this message]
2013-01-03 10:09         ` [PATCH] checkpatch: Warn on unnecessary __dev<foo> section markings Andy Whitcroft
2013-01-03  0:34     ` [PATCH] checkpatch: prefer dev_<level>( to dev_printk(KERN_<LEVEL> Bjorn Helgaas
2013-01-03  0:39       ` Joe Perches
2013-01-03 10:08     ` Andy Whitcroft
2013-01-03 16:28       ` Joe Perches
2013-01-03 16:49         ` [PATCH V2] " Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357173201.25181.22.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox