HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33392
Change subject: vendorcode/agesa/*/Proc/IDS/Library/IdsLib.c: Fix logical 'or' tests ......................................................................
vendorcode/agesa/*/Proc/IDS/Library/IdsLib.c: Fix logical 'or' tests
"if (_pcidata != 0xFFFFFFFF || _pcidata != 0)", is always true. The right test should be && not ||. Error found using -Wlogical-op warning option.
Change-Id: I537fa4867499e1e6e5f662086fabc99b91aa0c70 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c M src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c 2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/33392/1
diff --git a/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c b/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c index 34a12a7..046d182 100644 --- a/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c +++ b/src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c @@ -900,7 +900,7 @@ _pciaddr = PciAddr; _pciaddr.Address.Register = 0; LibAmdPciRead (AccessWidth32, _pciaddr, &_pcidata, StdHeader); - if (_pcidata != 0xFFFFFFFF || _pcidata != 0) { + if (_pcidata != 0xFFFFFFFF && _pcidata != 0) { status = TRUE; } return status; diff --git a/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c b/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c index 0cb0a63..b7a49b2 100644 --- a/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c +++ b/src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c @@ -983,7 +983,7 @@ _pciaddr = PciAddr; _pciaddr.Address.Register = 0; LibAmdPciRead (AccessWidth32, _pciaddr, &_pcidata, StdHeader); - if (_pcidata != 0xFFFFFFFF || _pcidata != 0) { + if (_pcidata != 0xFFFFFFFF && _pcidata != 0) { status = TRUE; } return status;