From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Blue Swirl <blauwirbel@gmail.com>, peter.chubb@nicta.com.au
Subject: [Qemu-devel] [PATCH 1.0] checkpatch.pl: fix CAST detection
Date: Fri, 25 Nov 2011 10:24:16 +0100 [thread overview]
Message-ID: <1322213056-16612-1-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <w4hb1sgabh.wl%peter@chubb.wattle.id.au>
From: Florian Mickler <florian@mickler.org>
We should only claim that something is a cast if we did not encouter a
token before, that did set av_pending.
This fixes the operator * in the line below to be detected as binary (vs
unary).
kmalloc(sizeof(struct alphatrack_ocmd) * true_size, GFP_KERNEL);
Reported-by: Peter Chubb <nicta.com.au>
Signed-off-by: Florian Mickler <florian@mickler.org>
(cherry-picked from Linux kernel commit c023e4734c3e8801e0ecb5e81b831d42a374d861)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
---
scripts/checkpatch.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 36d6851..ddd27d8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -859,7 +859,7 @@ sub annotate_values {
$av_preprocessor = 0;
}
- } elsif ($cur =~ /^(\(\s*$Type\s*)\)/) {
+ } elsif ($cur =~ /^(\(\s*$Type\s*)\)/ && $av_pending eq '_') {
print "CAST($1)\n" if ($dbg_values > 1);
push(@av_paren_type, $type);
$type = 'C';
--
1.7.7.1
next prev parent reply other threads:[~2011-11-25 9:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-25 3:17 [Qemu-devel] Who maintains checkpatch.pl now? Peter Chubb
2011-11-25 9:24 ` Paolo Bonzini [this message]
2011-11-26 9:52 ` [Qemu-devel] [PATCH 1.0] checkpatch.pl: fix CAST detection Blue Swirl
2011-11-25 9:26 ` [Qemu-devel] Who maintains checkpatch.pl now? Paolo Bonzini
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=1322213056-16612-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=peter.chubb@nicta.com.au \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).