* [PATCH v1 1/1] hwmon: (nct6775) Drop unneeded casting and conjunction
@ 2023-02-17 19:16 Andy Shevchenko
2023-02-25 15:09 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2023-02-17 19:16 UTC (permalink / raw)
To: Guenter Roeck, Zev Weiss, linux-hwmon, linux-kernel
Cc: Jean Delvare, Andy Shevchenko
The 64-bit result will be cut to 32-bit automatically (by compiler)
due to the type of the destination value. No need to have an explicit
casting and especially additional conjunction which does the same.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/hwmon/nct6775-platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c
index 76c6b564d7fc..7576b8ffec67 100644
--- a/drivers/hwmon/nct6775-platform.c
+++ b/drivers/hwmon/nct6775-platform.c
@@ -149,7 +149,7 @@ static int nct6775_asuswmi_evaluate_method(u32 method_id, u8 bank, u8 reg, u8 va
return -EIO;
if (retval)
- *retval = (u32)result & 0xFFFFFFFF;
+ *retval = result;
return 0;
#else
--
2.39.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-25 15:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-17 19:16 [PATCH v1 1/1] hwmon: (nct6775) Drop unneeded casting and conjunction Andy Shevchenko
2023-02-25 15:09 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox