diff mbox series

[01/16] hwmon: w83795: Fix type incompatibility with non-macro find_closest

Message ID 20250515081332.151250-2-asoponar@taladin.ro
State New
Headers show
Series [01/16] hwmon: w83795: Fix type incompatibility with non-macro find_closest | expand

Commit Message

Alexandru Soponar May 15, 2025, 8:13 a.m. UTC
The pwm_freq_cksel0 array was previously declared as u16 but used with
find_closest_descending(). Now that find_closest_descending() is
implemented as a function with 'int' parameters instead of a macro,
passing unsigned arrays causes type incompatibility errors. This patch
changes the array type from u16 to int to match the function's signature
and prevent compilation errors.

Signed-off-by: Alexandru Soponar <asoponar@taladin.ro>
---
 drivers/hwmon/w83795.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c
index 5174db69db5e..1b63bd540f6c 100644
--- a/drivers/hwmon/w83795.c
+++ b/drivers/hwmon/w83795.c
@@ -273,7 +273,7 @@  static inline s8 temp_to_reg(long val, s8 min, s8 max)
 	return clamp_val(val / 1000, min, max);
 }
 
-static const u16 pwm_freq_cksel0[16] = {
+static const int pwm_freq_cksel0[16] = {
 	1024, 512, 341, 256, 205, 171, 146, 128,
 	85, 64, 32, 16, 8, 4, 2, 1
 };