lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250515081332.151250-9-asoponar@taladin.ro>
Date: Thu, 15 May 2025 11:13:24 +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 08/16] hwmon: max6639: Fix type incompatibility with non-macro find_closest

The freq_table array was previously declared as unsigned int but used
with find_closest(). With find_closest() now implemented as a function
taking signed int parameters instead of a macro, passing unsigned arrays
causes type incompatibility errors. This patch changes the array type from
unsigned int to int to ensure compatibility with the function signature and
prevent compilation errors.

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

diff --git a/drivers/hwmon/max6639.c b/drivers/hwmon/max6639.c
index 32b4d54b2076..b6942b406880 100644
--- a/drivers/hwmon/max6639.c
+++ b/drivers/hwmon/max6639.c
@@ -63,7 +63,7 @@ static const unsigned short normal_i2c[] = { 0x2c, 0x2e, 0x2f, I2C_CLIENT_END };
 static const int rpm_ranges[] = { 2000, 4000, 8000, 16000 };
 
 /* Supported PWM frequency */
-static const unsigned int freq_table[] = { 20, 33, 50, 100, 5000, 8333, 12500,
+static const int freq_table[] = { 20, 33, 50, 100, 5000, 8333, 12500,
 					   25000 };
 
 #define FAN_FROM_REG(val, rpm_range)	((val) == 0 || (val) == 255 ? \
-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ