[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250515081332.151250-2-asoponar@taladin.ro>
Date: Thu, 15 May 2025 11:13:17 +0300
From: Alexandru Soponar <asoponar@...adin.ro>
To: linux-kernel@...r.kernel.org,
linux-hwmon@...r.kernel.org,
linux-iio@...r.kernel.org,
linux-leds@...r.kernel.org,
linux-watchdog@...r.kernel.org
Cc: jdelvare@...e.com,
linux@...ck-us.net,
jic23@...nel.org,
pavel@....cz,
lee@...nel.org,
baocheng.su@...mens.com,
wim@...ux-watchdog.org,
tobias.schaffner@...mens.com,
angelogioacchino.delregno@...labora.com,
benedikt.niedermayr@...mens.com,
matthias.bgg@...il.com,
aardelean@...libre.com,
contact@...y.one,
Alexandru Soponar <asoponar@...adin.ro>
Subject: [PATCH 01/16] hwmon: w83795: Fix type incompatibility with non-macro find_closest
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@...adin.ro>
---
drivers/hwmon/w83795.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
};
--
2.49.0
Powered by blists - more mailing lists