mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@canonical.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>
Subject: [PATCH 4/8] checkpatch: pointer type star may have modifiers following
Date: Fri, 30 Jan 2009 15:05:16 +0000	[thread overview]
Message-ID: <1233327920-16691-5-git-send-email-apw@canonical.com> (raw)
In-Reply-To: <1233327920-16691-1-git-send-email-apw@canonical.com>

We may have any modifier following a pointer type star.  Handle this:

	void * __user * __user foo;

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 scripts/checkpatch.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 92d1371..15a5904 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1886,11 +1886,11 @@ sub process {
 					if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {
 						ERROR("space required before that '$op' $at\n" . $hereptr);
 					}
-					if ($op eq '*' && $cc =~/\s*const\b/) {
+					if ($op eq '*' && $cc =~/\s*$Modifier\b/) {
 						# A unary '*' may be const
 
 					} elsif ($ctx =~ /.xW/) {
-						ERROR("space prohibited after that '$op' $at\n" . $hereptr);
+						ERROR("Aspace prohibited after that '$op' $at\n" . $hereptr);
 					}
 
 				# unary ++ and unary -- are allowed no space on one side.
-- 
1.6.1.2.419.g0d87e


  parent reply	other threads:[~2009-01-30 15:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-30 15:05 [PATCH 0/8] update checkpatch to v0.28 Andy Whitcroft
2009-01-30 15:05 ` [PATCH 1/8] checkpatch: make in_atomic ok in the core Andy Whitcroft
2009-01-30 15:05 ` [PATCH 2/8] checkpatch: do not warn about -p0 patches when checking files Andy Whitcroft
2009-01-30 15:05 ` [PATCH 3/8] checkpatch: correctly handle type spacing in the face of modifiers Andy Whitcroft
2009-01-30 15:05 ` Andy Whitcroft [this message]
2009-01-30 15:05 ` [PATCH 5/8] checkpatch: a modifier is not an identifier at the end of a type Andy Whitcroft
2009-01-30 15:05 ` [PATCH 6/8] checkpatch: extend attribute testing to all modifiers Andy Whitcroft
2009-01-30 15:05 ` [PATCH 7/8] checkpatch: add __ref as a sparse modifier Andy Whitcroft
2009-01-30 15:05 ` [PATCH 8/8] checkpatch: version 0.28 Andy Whitcroft

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=1233327920-16691-5-git-send-email-apw@canonical.com \
    --to=apw@canonical.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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®