mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	 Daniel Lezcano <daniel.lezcano@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	 Lukasz Luba <lukasz.luba@arm.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Tudor Ambarus <tudor.ambarus@linaro.org>
Subject: [PATCH] thermal: thresholds: change thermal_thresholds_init to return void
Date: Tue, 02 Dec 2025 12:02:29 +0000	[thread overview]
Message-ID: <20251202-th-threshold-init-v1-1-7e5d7e878b6c@linaro.org> (raw)

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@linaro.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@linaro.org>


                 reply	other threads:[~2025-12-02 12:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251202-th-threshold-init-v1-1-7e5d7e878b6c@linaro.org \
    --to=tudor.ambarus@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®