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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250515081332.151250-10-asoponar@taladin.ro>
Date: Thu, 15 May 2025 11:13:25 +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 09/16] hwmon: max20740: Fix type incompatibility with non-macro find_closest

The max_current array was previously declared as u32 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 u32
to int to ensure compatibility with the function signature and prevent
compilation errors.

Signed-off-by: Alexandru Soponar <asoponar@...adin.ro>
---
 drivers/hwmon/pmbus/max20730.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/pmbus/max20730.c b/drivers/hwmon/pmbus/max20730.c
index 95869d198ecf..0e8d292e9ff4 100644
--- a/drivers/hwmon/pmbus/max20730.c
+++ b/drivers/hwmon/pmbus/max20730.c
@@ -436,7 +436,7 @@ static long direct_to_val(u16 w, enum pmbus_sensor_classes class,
 	return d;
 }
 
-static u32 max_current[][5] = {
+static int max_current[][5] = {
 	[max20710] = { 6200, 8000, 9700, 11600 },
 	[max20730] = { 13000, 16600, 20100, 23600 },
 	[max20734] = { 21000, 27000, 32000, 38000 },
@@ -449,7 +449,7 @@ static int max20730_read_word_data(struct i2c_client *client, int page,
 	const struct pmbus_driver_info *info = pmbus_get_driver_info(client);
 	const struct max20730_data *data = to_max20730_data(info);
 	int ret = 0;
-	u32 max_c;
+	int max_c;
 
 	switch (reg) {
 	case PMBUS_OT_FAULT_LIMIT:
-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ