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

Re: [Xen-devel] [PATCH] x86: Address "Bitwise-and with zero CONSTANT_EXPRESSION_RESULT" Coverity issues

>>> On 27.06.18 at 14:27, <andrew.cooper3@xxxxxxxxxx> wrote:
> Coverity complains at code which which performs a bitwise and with a constant
> that happens to be zero.  Both _PAGE_GNTTAB and PG_SH_enable may be 0
> depending on Kconfig settings.
> Rearrange the C to test the constant first and short circuit the bitwise and.

Hmm, well, this makes the code look quite, ehem, interesting.
Normally such would seem a prime candidate for cleaning up,
especially without any comment attached. But anyway, if it
helps ...

> No functional change.
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.