From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
Richard Henderson <rth@twiddle.net>,
Alexander Graf <agraf@suse.de>,
Christian Borntraeger <borntraeger@de.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] s390: avoid always-true comparison in s390_pci_generate_fid()
Date: Thu, 20 Oct 2016 15:26:12 +0200 [thread overview]
Message-ID: <20161020152612.7f7dadf6.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1476968226-15918-1-git-send-email-peter.maydell@linaro.org>
On Thu, 20 Oct 2016 13:57:06 +0100
Peter Maydell <peter.maydell@linaro.org> wrote:
> Coverity points out that the comparison "fid <= ZPCI_MAX_FID"
> in s390_pci_generate_fid() is always true (because fid
> is 32 bits and ZPCI_MAX_FID is 0xffffffff). This isn't a
> bug because the real loop termination condition is
> expressed later via an "if (...) break;" inside the loop,
> but it is a bit odd. Rephrase the loop to avoid the
> unnecessary duplicate-but-never-true conditional.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> hw/s390x/s390-pci-bus.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
I assume this will go via the trivial tree?
next prev parent reply other threads:[~2016-10-20 13:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 12:57 [Qemu-devel] [PATCH] s390: avoid always-true comparison in s390_pci_generate_fid() Peter Maydell
2016-10-20 13:26 ` Cornelia Huck [this message]
2016-10-26 18:42 ` Michael Tokarev
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=20161020152612.7f7dadf6.cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=rth@twiddle.net \
/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).