提交 667026e7 编写于 作者: A Andy Whitcroft 提交者: Linus Torvalds

checkpatch: a modifier is not an identifier at the end of a type

We must make sure we do not misrecognise a modifier as an Identifier
when trying to match types.  Prevent us matching this:

	void * __ref
Signed-off-by: NAndy Whitcroft <apw@canonical.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a3340b35
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册