From: Peter Lieven <pl@kamp.de>
To: Paolo Bonzini <pbonzini@redhat.com>,
Eric Blake <eblake@redhat.com>, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org
Cc: Miroslav Rezanina <mrezanin@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Max Reitz <mreitz@redhat.com>,
qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] util: Fix MIN_NON_ZERO
Date: Mon, 18 Jul 2016 10:00:11 +0200 [thread overview]
Message-ID: <578C8C8B.1040700@kamp.de> (raw)
In-Reply-To: <9832869c-5e80-6636-8618-e4251f649726@redhat.com>
Am 12.07.2016 um 18:24 schrieb Paolo Bonzini:
>
> On 12/07/2016 17:54, Eric Blake wrote:
>> On 07/12/2016 12:48 AM, Fam Zheng wrote:
>>> MIN_NON_ZERO(0, 1) is evaluated to 0. Rewrite the macro to fix it.
>> Huh?
>>
>> Old expansion, in various stages:
>>
>> (((0) != 0 && (0) < (1)) ? (0) : (1))
>> ((0 && 1) ? 0 : 1)
>> (0 ? 0 : 1)
>> 1
>>
>> Maybe you meant MIN_NON_ZERO(1, 0), which evaluates to:
>>
>> (((1) != 0 && (1) < (0)) ? (1) : (0))
>> ((1 && 0) ? 1 : 0)
>> (0 ? 1 : 0)
>> 0
>>
>> in which case, you are correct that there is a bug.
> Commit message fixed, patch queued.
>
> Paolo
Shouldn't we Cc qemu-stable?
Peter
next prev parent reply other threads:[~2016-07-18 8:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-12 6:48 [Qemu-devel] [PATCH] util: Fix MIN_NON_ZERO Fam Zheng
2016-07-12 15:54 ` Eric Blake
2016-07-12 16:24 ` Paolo Bonzini
2016-07-18 8:00 ` Peter Lieven [this message]
2016-07-14 12:17 ` Stefan Hajnoczi
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=578C8C8B.1040700@kamp.de \
--to=pl@kamp.de \
--cc=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=mreitz@redhat.com \
--cc=mrezanin@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=stefanha@redhat.com \
/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).