From a360d9a6bf6556a7e73c40f257e807a73964bb70 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Tue, 11 Jun 2019 13:18:04 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/33392 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/vendorcode/amd/agesa/f15tn/Proc/IDS/Library/IdsLib.c | 2 +- src/vendorcode/amd/agesa/f16kb/Proc/IDS/Library/IdsLib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vendorcode/amd') 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 34a12a78e6..046d1826aa 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 @@ IdsCheckPciExisit ( _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 0cb0a63680..b7a49b27f1 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 @@ IdsCheckPciExisit ( _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; -- cgit v1.2.3