Jacob Garber has uploaded this change for review. ( 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 --- M src/southbridge/amd/cimx/sb900/early.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/33454/1
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; }