From: Joe Perches <joe@perches.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/2] staging: slicoss: fix missing blank line (fwd)
Date: Tue, 05 Apr 2016 23:29:42 -0700 [thread overview]
Message-ID: <1459924182.6715.30.camel@perches.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1604060716280.2210@localhost6.localdomain6>
On Wed, 2016-04-06 at 07:17 +0200, Julia Lawall wrote:
> I have the impression that __iomem is in the wrong place in the following
> code. Perhaps checkpatch could do something about that? Coccinelle,
> unfortunately, skips over such annotations, to simplify parsing...
[]
> __iomem struct slic_regs *slic_regs = adapter->slic_regs;
Maybe so.
There aren't many of these in the kernel tree.
$ git grep -E "^\s+__iomem" | wc -l
46
And there are a whole lot more after the type,
so maybe this is appropriate.
---
scripts/checkpatch.pl | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e3d9c34..1b23495 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3400,6 +3400,14 @@ sub process {
}
}
+# check for attributions like __iomem before the type
+ while ($sline =~ m{(\b$Type\s*$Ident)}g) {
+ my $tmp = trim($1);
+ next if ($tmp !~ /^($Sparse)\b/);
+ WARN("ATTRIBUTE_LOCATION",
+ "attribute '$1' should be positioned after the type\n" . $herecurr);
+ }
+
# check for misordered declarations of char/short/int/long with signed/unsigned
while ($sline =~ m{(\b$TypeMisordered\b)}g) {
my $tmp = trim($1);
parent reply other threads:[~2016-04-06 6:29 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <alpine.DEB.2.02.1604060716280.2210@localhost6.localdomain6>]
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=1459924182.6715.30.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=julia.lawall@lip6.fr \
--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
all inboxes | Powered by JetHome®