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

Re: [Xen-devel] [PATCH for-4.9] x86/mm: Placate DEADCODE Coverity warning



>>> On 22.05.17 at 15:12, <andrew.cooper3@xxxxxxxxxx> wrote:
> _PAGE_GNTTAB is only used in debug builds of Xen; in release builds, it has
> the value 0.  Coverity complains that "l1e_get_flags(l1e) & 0" is logically
> dead.
> 
> Add an extra condition into the logic to skip the flag check if _PAGE_GNTTAB
> is 0.

And this helps? To me "if ( 0 && ... )" and "if ( (x & 0) && ... )" look
logically the same (i.e. I'd expect the same warnings to be triggered
[or not]).

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

So provided the change really silences Coverity:
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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