[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 02 Feb 2015 15:28:35 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Radim Krčmář <rkrcmar@...hat.com>
CC: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Nadav Amit <namit@...technion.ac.il>,
Gleb Natapov <gleb@...nel.org>
Subject: Re: [PATCH 2/8] KVM: x86: cleanup kvm_apic_match_*()
On 02/02/2015 15:26, Radim Krčmář wrote:
>>> > > + return ((logical_id >> 4) == (mda >> 4))
>>> > > + && (logical_id & mda & 0xf);
> was merged as
>
> + return ((logical_id >> 4) == (mda >> 4))
> + && (logical_id & mda & 0xf) != 0;
>
> but it has to be parenthesized ('&&' has lower precedence than '!=').
Lower precedence means that the merged version is right (unless my brain
went bonkers, which I cannot exclude). "!=" has higher precedence and
thus it is implicitly parenthesized.
In fact the first comparison could have its parentheses removed as well.
Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists