[coreboot-gerrit] New patch to review for coreboot: i2c/w83795: Fix chip type message

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Mon Aug 1 15:59:26 CEST 2016


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16009

-gerrit

commit 9bca3bfcca6691d4a03b9fd8ac3c63ce7c8e6733
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Mon Aug 1 15:56:09 2016 +0200

    i2c/w83795: Fix chip type message
    
    (val & 4) == 1 is always false. Since val & 4 is either zero or
    non-zero, just drop the second test (for "== 1").
    Validated against the data sheet that this is really the right register,
    bit and value.
    
    Change-Id: I627df9a9b4fddfff486689e405f52a3b54135eef
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Found-by: Coverity Scan #1241864
---
 src/drivers/i2c/w83795/w83795.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/drivers/i2c/w83795/w83795.c b/src/drivers/i2c/w83795/w83795.c
index 24da12c..02b7c37 100644
--- a/src/drivers/i2c/w83795/w83795.c
+++ b/src/drivers/i2c/w83795/w83795.c
@@ -160,7 +160,7 @@ static void w83795_init(struct device *dev, w83795_fan_mode_t mode, u8 dts_src)
 	val = w83795_read(dev, W83795_REG_CONFIG);
 	if ((val & W83795_REG_CONFIG_CONFIG48) == 0)
 		printk(BIOS_INFO, "Found 64 pin W83795G Nuvoton H/W Monitor\n");
-	else if ((val & W83795_REG_CONFIG_CONFIG48) == 1)
+	else
 		printk(BIOS_INFO, "Found 48 pin W83795ADG Nuvoton H/W Monitor\n");
 
 	/* Reset */



More information about the coreboot-gerrit mailing list