Skip to contentSkip to conversation

hwmon: (it87) Features mask must be 32 bit wide

PATCH New Guenter Roeck 1 participant 1 message Aug 10, 2016

Subsystems (2)
lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 1/1 hwmon: (it87) Features mask must be 32 bit wide

Coverity reports:

result_independent_of_operands: data->features & (65536UL /* 1UL << 16 */) is always 0 regardless of the values of its operands. This occurs as the logical operand of if.

data->features needs to be 32 bit wide since there are more than 16 features.

Fixes cc18da79d9b7 ("hwmon: (it87) Support up to 6 temperature sensors ... ");
---
 drivers/hwmon/it87.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/it87.c +1 -1
index 730d84028260..d0203a115eff 100644
@@ -491,7 +491,7 @@ struct it87_sio_data {
 struct it87_data {
 	const struct attribute_group *groups[7];
 	enum chips type;
-	u16 features;
+	u32 features;
 	u8 peci_mask;
 	u8 old_peci_mask;
 
Signature · 1 line
2.5.0