Coverity CID 142811: pci_set_vga_state() operands don't affect result

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

 



Coverity complains about this in drivers/pci/pci.c:

CID 142811 (#1 of 1): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
result_independent_of_operands: flags & (2U /* 1 << 1 */) &
(command_bits & 4294967292U /* ~(1 | 2) */) is always 0 regardless of
the values of its operands. This occurs as the logical operand of if.

4128        WARN_ON((flags & PCI_VGA_STATE_CHANGE_DECODES) &
(command_bits & ~(PCI_COMMAND_IO|PCI_COMMAND_MEMORY)));

This is a result of 3448a19da479 "vgaarb: use bridges to control VGA
routing where possible."

I wonder if that middle "&" was intended to be "&&"?

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux