From: "Andreas Färber" <afaerber@suse.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel Developers <qemu-devel@nongnu.org>,
Alexander Graf <agraf@suse.de>
Subject: [Qemu-devel] [BUG] checkpatch: ERROR due to * recognized as operator
Date: Thu, 09 Feb 2012 16:30:57 +0100 [thread overview]
Message-ID: <4F33E6B1.4090901@suse.de> (raw)
Hello Blue,
I recently stumbled over the following checkpatch.pl false positive:
--8<--
--- a/hw/his.c
+++ b/hw/his.c
@@ -1,1 +1,1 @@
- cpu_reset(CPUState *env);
+ cpu_state_reset(CPUState *env);
--- a/hw/hers.c
+++ b/hw/hers.c
@@ -1,1 +1,1 @@
- cpu_reset(CPUX86State *env);
+ cpu_state_reset(CPUX86State *env);
--- a/hw/its.c
+++ b/hw/its.c
@@ -1,1 +1,1 @@
-cpu_reset(CPUState *env);
+cpu_state_reset(CPUState *env);
--- a/hw/theirs.c
+++ b/hw/theirs.c
@@ -1,2 +1,2 @@
typedef struct CPUState CPUState;
-cpu_reset(CPUState *env);
+cpu_state_reset(CPUState *env);
--8<--
results in:
ERROR: need consistent spacing around '*' (ctx:WxV)
#5: FILE: hw/his.c:1:
+ cpu_state_reset(CPUState *env);
^
ERROR: need consistent spacing around '*' (ctx:WxV)
#11: FILE: hw/hers.c:1:
+ cpu_state_reset(CPUX86State *env);
^
ERROR: need consistent spacing around '*' (ctx:WxV)
#17: FILE: hw/its.c:1:
+cpu_state_reset(CPUState *env);
^
ERROR: need consistent spacing around '*' (ctx:WxV)
#24: FILE: hw/theirs.c:2:
+cpu_state_reset(CPUState *env);
^
total: 4 errors, 0 warnings, 9 lines checked
So, it seems to interpret the * symbol as multiplication rather than
pointer.
Surprisingly, in my real code, using CPUState in place of CPUX86State
was actually able to remedy the ERROR but not in this simplified test
case. I added some prints around that place and it seems, in the working
CPUState case it didn't even enter the op checking code path.
Any ideas?
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next reply other threads:[~2012-02-09 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 15:30 Andreas Färber [this message]
2012-02-11 9:26 ` [Qemu-devel] [BUG] checkpatch: ERROR due to * recognized as operator Blue Swirl
2012-02-11 11:28 ` Andreas Färber
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=4F33E6B1.4090901@suse.de \
--to=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=blauwirbel@gmail.com \
--cc=peter.maydell@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.