Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5833
-gerrit
commit eb67789fc69d4f98dfe8290f74bc606dee685f57 Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Sat May 24 04:01:38 2014 +1000
mainboard/amd: Incorrect usage of logical vs. bitwise and
Spotted by Clang
Change-Id: I26201c7f5e421c38d3965d8e7e62c4a8e670e449 Signed-off-by: Edward O'Callaghan eocallaghan@alterapraxis.com --- src/mainboard/amd/dinar/gpio.c | 2 +- src/mainboard/amd/torpedo/gpio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mainboard/amd/dinar/gpio.c b/src/mainboard/amd/dinar/gpio.c index 4e60f18..0b3a89b 100644 --- a/src/mainboard/amd/dinar/gpio.c +++ b/src/mainboard/amd/dinar/gpio.c @@ -256,7 +256,7 @@ gpioEarlyInit( // WAIT POWER READY: GPIO28 (MXM_PWRGD) //while (!(Mmio8 (GpioMmioAddr, SB_GPIO_REG28) && BIT7)){} ReadMEM (GpioMmioAddr + SB_GPIO_REG28, AccWidthUint8, &Data8); - while (!(Data8 && BIT7)) + while (!(Data8 & BIT7)) { ReadMEM (GpioMmioAddr + SB_GPIO_REG28, AccWidthUint8, &Data8); } diff --git a/src/mainboard/amd/torpedo/gpio.c b/src/mainboard/amd/torpedo/gpio.c index d2d2bea..a8aba5e 100644 --- a/src/mainboard/amd/torpedo/gpio.c +++ b/src/mainboard/amd/torpedo/gpio.c @@ -255,7 +255,7 @@ gpioEarlyInit( // WAIT POWER READY: GPIO28 (MXM_PWRGD) //while (!(Mmio8 (GpioMmioAddr, SB_GPIO_REG28) && BIT7)){} ReadMEM (GpioMmioAddr + SB_GPIO_REG28, AccWidthUint8, &Data8); - while (!(Data8 && BIT7)) + while (!(Data8 & BIT7)) { ReadMEM (GpioMmioAddr + SB_GPIO_REG28, AccWidthUint8, &Data8); }