Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33454 )
Change subject: sb/amd/cimx/sb900: Change logical negation to bitwise ......................................................................
sb/amd/cimx/sb900: Change logical negation to bitwise
data &= !BIT0 will clear data, since !BIT0 evaluates to 0 (oops). We only want to clear bit 0, not the whole thing, so use bitwise negation instead.
Change-Id: I2179119e0d2d4aceaf4f8b499bf4c5baf4ef677f Signed-off-by: Jacob Garber jgarber1@ualberta.ca Found-by: Coverity CID 1241812 Reviewed-on: https://review.coreboot.org/c/coreboot/+/33454 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-by: Marshall Dawson marshalldawson3rd@gmail.com --- M src/southbridge/amd/cimx/sb900/early.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Kyösti Mälkki: Looks good to me, approved Marshall Dawson: Looks good to me, approved
diff --git a/src/southbridge/amd/cimx/sb900/early.c b/src/southbridge/amd/cimx/sb900/early.c index 5ebe47e..1aa9a5a 100644 --- a/src/southbridge/amd/cimx/sb900/early.c +++ b/src/southbridge/amd/cimx/sb900/early.c @@ -39,7 +39,7 @@ //Enable/Disable PCI Bridge Device 14 Function 4. outb(0xEA, 0xCD6); data = inb(0xCD7); - data &= !BIT0; + data &= ~BIT0; if (!CONFIG(PCIB_ENABLE)) { data |= BIT0; }