[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1233327920-16691-6-git-send-email-apw@canonical.com>
Date: Fri, 30 Jan 2009 15:05:17 +0000
From: Andy Whitcroft <apw@...onical.com>
To: Andrew Morton <akpm@...l.org>
Cc: Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
Andy Whitcroft <apw@...onical.com>
Subject: [PATCH 5/8] checkpatch: a modifier is not an identifier at the end of a type
We must make sure we do not miss recognise a modifier as an Identifier
when trying to match types. Prevent us matching this:
void * __ref
Signed-off-by: Andy Whitcroft <apw@...onical.com>
---
scripts/checkpatch.pl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 15a5904..b9e9ee1 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1686,8 +1686,8 @@ sub process {
# Modifiers should have spaces.
$to =~ s/(\b$Modifier$)/$1 /;
- #print "from<$from> to<$to>\n";
- if ($from ne $to) {
+ #print "from<$from> to<$to> ident<$ident>\n";
+ if ($from ne $to && $ident !~ /^$Modifier$/) {
ERROR("\"foo${from}bar\" should be \"foo${to}bar\"\n" . $herecurr);
}
}
--
1.6.1.2.419.g0d87e
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists