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>] [day] [month] [year] [list]
Message-Id: <20251202-th-threshold-init-v1-1-7e5d7e878b6c@linaro.org>
Date: Tue, 02 Dec 2025 12:02:29 +0000
From: Tudor Ambarus <tudor.ambarus@...aro.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>, 
 Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>, 
 Lukasz Luba <lukasz.luba@....com>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Tudor Ambarus <tudor.ambarus@...aro.org>
Subject: [PATCH] thermal: thresholds: change thermal_thresholds_init to
 return void

The function always returns 0, so change its return type to void and
remove the return value check in the caller.

Signed-off-by: Tudor Ambarus <tudor.ambarus@...aro.org>
---
 drivers/thermal/thermal_core.c       | 6 +-----
 drivers/thermal/thermal_thresholds.c | 4 +---
 drivers/thermal/thermal_thresholds.h | 2 +-
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 17ca5c082643592b46cbbe708c716230fac215ef..05c1e2ff6a0a29e640646132a8d4a0ee63a200a8 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1618,9 +1618,7 @@ thermal_zone_device_register_with_trips(const char *type,
 			goto unregister;
 	}
 
-	result = thermal_thresholds_init(tz);
-	if (result)
-		goto remove_hwmon;
+	thermal_thresholds_init(tz);
 
 	thermal_zone_init_complete(tz);
 
@@ -1630,8 +1628,6 @@ thermal_zone_device_register_with_trips(const char *type,
 
 	return tz;
 
-remove_hwmon:
-	thermal_remove_hwmon_sysfs(tz);
 unregister:
 	device_del(&tz->device);
 release_device:
diff --git a/drivers/thermal/thermal_thresholds.c b/drivers/thermal/thermal_thresholds.c
index 38f5fd0e89303aca32be3c6b11928196b825502b..351f4a464b11df1b64f45f980a349d19a3521b4b 100644
--- a/drivers/thermal/thermal_thresholds.c
+++ b/drivers/thermal/thermal_thresholds.c
@@ -13,11 +13,9 @@
 #include "thermal_core.h"
 #include "thermal_thresholds.h"
 
-int thermal_thresholds_init(struct thermal_zone_device *tz)
+void thermal_thresholds_init(struct thermal_zone_device *tz)
 {
 	INIT_LIST_HEAD(&tz->user_thresholds);
-
-	return 0;
 }
 
 static void __thermal_thresholds_flush(struct thermal_zone_device *tz)
diff --git a/drivers/thermal/thermal_thresholds.h b/drivers/thermal/thermal_thresholds.h
index cb372659a20d648e92d7800628d29f4343f4137b..5e2629ca369875f4336a2b334fa0da4bcfe9e54b 100644
--- a/drivers/thermal/thermal_thresholds.h
+++ b/drivers/thermal/thermal_thresholds.h
@@ -8,7 +8,7 @@ struct user_threshold {
 	int direction;
 };
 
-int thermal_thresholds_init(struct thermal_zone_device *tz);
+void thermal_thresholds_init(struct thermal_zone_device *tz);
 void thermal_thresholds_exit(struct thermal_zone_device *tz);
 void thermal_thresholds_handle(struct thermal_zone_device *tz, int *low, int *high);
 void thermal_thresholds_flush(struct thermal_zone_device *tz);

---
base-commit: 63d26c3811421ceeb5b82a85489b88bf545e33c7
change-id: 20251202-th-threshold-init-ce03d234ad4d

Best regards,
-- 
Tudor Ambarus <tudor.ambarus@...aro.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ