qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [PATCH for-2.9? v2 resend] ipmi: Fix macro issues


From: Eric Blake
Subject: Re: [Qemu-trivial] [PATCH for-2.9? v2 resend] ipmi: Fix macro issues
Date: Fri, 31 Mar 2017 09:01:48 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 03/31/2017 08:32 AM, Corey Minyard wrote:

>> Note, on the other hand, that a call such as
>> IPMI_BT_SET_HBUSY(ib->control_reg, 2) would result in writing 0 to the
>> HBUSY bit. In other words, the IPMI_BT_SET_HBUSY() macro is rather weird
>> in that it sets or clears the HBUSY bit based solely on whether its v
>> parameter is even or odd, rather than the more usual semantics of
>> whether the v parameter is 0 or non-zero.  We could change that if we
>> wanted - by having the macro expand to "(left | (!!(v) << shift))"
>> instead of our current expansion of "(left | (((v) & 1) << shift))" -
>> but I still don't think it would change the semantics of any existing
>> caller.
> 
> Yeah, that would be better.  Should I do another patch?

Up to you; I'm fine with either the existing patch as proposed or with
reviewing a v4 (interesting that you resent v2, even though you had also
posted a v3 at one point, where the only difference seems to have been
adding my R-b).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]