* [PATCH] hwmon: (it87) Features mask must be 32 bit wide
@ 2016-08-10 5:33 Guenter Roeck
0 siblings, 0 replies; only message in thread
From: Guenter Roeck @ 2016-08-10 5:33 UTC (permalink / raw)
To: Jean Delvare; +Cc: linux-hwmon, linux-kernel, Guenter Roeck
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 ... ");
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/hwmon/it87.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 730d84028260..d0203a115eff 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -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;
--
2.5.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-10 22:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-10 5:33 [PATCH] hwmon: (it87) Features mask must be 32 bit wide Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®