[PATCH v1 3/3] thermal: core: Drop tz field from struct thermal_instance

Rafael J. Wysocki posted 1 patch 1 year, 5 months ago
drivers/thermal/thermal_core.c    |    2 +-
drivers/thermal/thermal_core.h    |    1 -
drivers/thermal/thermal_helpers.c |    2 --
3 files changed, 1 insertion(+), 4 deletions(-)
[PATCH v1 3/3] thermal: core: Drop tz field from struct thermal_instance
Posted by Rafael J. Wysocki 1 year, 5 months ago
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

After recent changes, it is only used for printing a debug message
in __thermal_cdev_update() which arguably is not worth preserving.

Drop it along with the dev_dbg() statement using it.

Link: https://lore.kernel.org/linux-pm/4a8d8f5a-122d-4c26-b8d6-76a65e42216b@linaro.org
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/thermal/thermal_core.c    |    2 +-
 drivers/thermal/thermal_core.h    |    1 -
 drivers/thermal/thermal_helpers.c |    2 --
 3 files changed, 1 insertion(+), 4 deletions(-)

Index: linux-pm/drivers/thermal/thermal_core.h
===================================================================
--- linux-pm.orig/drivers/thermal/thermal_core.h
+++ linux-pm/drivers/thermal/thermal_core.h
@@ -213,7 +213,6 @@ int get_tz_trend(struct thermal_zone_dev
 struct thermal_instance {
 	int id;
 	char name[THERMAL_NAME_LENGTH];
-	struct thermal_zone_device *tz;
 	struct thermal_cooling_device *cdev;
 	const struct thermal_trip *trip;
 	bool initialized;
Index: linux-pm/drivers/thermal/thermal_helpers.c
===================================================================
--- linux-pm.orig/drivers/thermal/thermal_helpers.c
+++ linux-pm/drivers/thermal/thermal_helpers.c
@@ -181,8 +181,6 @@ void __thermal_cdev_update(struct therma
 
 	/* Make sure cdev enters the deepest cooling state */
 	list_for_each_entry(instance, &cdev->thermal_instances, cdev_node) {
-		dev_dbg(&cdev->device, "zone%d->target=%lu\n",
-			instance->tz->id, instance->target);
 		if (instance->target == THERMAL_NO_TARGET)
 			continue;
 		if (instance->target > target)
Index: linux-pm/drivers/thermal/thermal_core.c
===================================================================
--- linux-pm.orig/drivers/thermal/thermal_core.c
+++ linux-pm/drivers/thermal/thermal_core.c
@@ -792,7 +792,7 @@ static int thermal_bind_cdev_to_trip(str
 	dev = kzalloc(sizeof(*dev), GFP_KERNEL);
 	if (!dev)
 		return -ENOMEM;
-	dev->tz = tz;
+
 	dev->cdev = cdev;
 	dev->trip = trip;
 	dev->upper = cool_spec->upper;
Re: [PATCH v1 3/3] thermal: core: Drop tz field from struct thermal_instance
Posted by Daniel Lezcano 1 year, 5 months ago
On 22/08/2024 21:27, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> After recent changes, it is only used for printing a debug message
> in __thermal_cdev_update() which arguably is not worth preserving.
> 
> Drop it along with the dev_dbg() statement using it.
> 
> Link: https://lore.kernel.org/linux-pm/4a8d8f5a-122d-4c26-b8d6-76a65e42216b@linaro.org
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog