[PATCH v1 02/10] thermal: core: Rename trip list node in struct thermal_trip_desc

Rafael J. Wysocki posted 1 patch 1 month, 1 week ago
drivers/thermal/thermal_core.c |   10 +++++-----
drivers/thermal/thermal_core.h |    2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
[PATCH v1 02/10] thermal: core: Rename trip list node in struct thermal_trip_desc
Posted by Rafael J. Wysocki 1 month, 1 week ago
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Since the list node field in struct thermal_trip_desc is going to be
used for purposes other than trip crossing notification, rename it
to list_node.

No functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/thermal/thermal_core.c |   10 +++++-----
 drivers/thermal/thermal_core.h |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

Index: linux-pm/drivers/thermal/thermal_core.c
===================================================================
--- linux-pm.orig/drivers/thermal/thermal_core.c
+++ linux-pm/drivers/thermal/thermal_core.c
@@ -414,13 +414,13 @@ static void add_trip_to_sorted_list(stru
 	struct thermal_trip_desc *entry;
 
 	/* Assume that the new entry is likely to be the last one. */
-	list_for_each_entry_reverse(entry, list, notify_list_node) {
+	list_for_each_entry_reverse(entry, list, list_node) {
 		if (entry->notify_temp <= td->notify_temp) {
-			list_add(&td->notify_list_node, &entry->notify_list_node);
+			list_add(&td->list_node, &entry->list_node);
 			return;
 		}
 	}
-	list_add(&td->notify_list_node, list);
+	list_add(&td->list_node, list);
 }
 
 static void handle_thermal_trip(struct thermal_zone_device *tz,
@@ -586,10 +586,10 @@ void __thermal_zone_device_update(struct
 
 	thermal_zone_set_trips(tz, low, high);
 
-	list_for_each_entry(td, &way_up_list, notify_list_node)
+	list_for_each_entry(td, &way_up_list, list_node)
 		thermal_trip_crossed(tz, &td->trip, governor, true);
 
-	list_for_each_entry_reverse(td, &way_down_list, notify_list_node)
+	list_for_each_entry_reverse(td, &way_down_list, list_node)
 		thermal_trip_crossed(tz, &td->trip, governor, false);
 
 	if (governor->manage)
Index: linux-pm/drivers/thermal/thermal_core.h
===================================================================
--- linux-pm.orig/drivers/thermal/thermal_core.h
+++ linux-pm/drivers/thermal/thermal_core.h
@@ -31,7 +31,7 @@ struct thermal_trip_attrs {
 struct thermal_trip_desc {
 	struct thermal_trip trip;
 	struct thermal_trip_attrs trip_attrs;
-	struct list_head notify_list_node;
+	struct list_head list_node;
 	struct list_head thermal_instances;
 	int notify_temp;
 	int threshold;
Re: [PATCH v1 02/10] thermal: core: Rename trip list node in struct thermal_trip_desc
Posted by Lukasz Luba 1 month ago

On 10/16/24 12:23, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Since the list node field in struct thermal_trip_desc is going to be
> used for purposes other than trip crossing notification, rename it
> to list_node.
> 
> No functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>   drivers/thermal/thermal_core.c |   10 +++++-----
>   drivers/thermal/thermal_core.h |    2 +-
>   2 files changed, 6 insertions(+), 6 deletions(-)
> 
> Index: linux-pm/drivers/thermal/thermal_core.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/thermal_core.c
> +++ linux-pm/drivers/thermal/thermal_core.c
> @@ -414,13 +414,13 @@ static void add_trip_to_sorted_list(stru
>   	struct thermal_trip_desc *entry;
>   
>   	/* Assume that the new entry is likely to be the last one. */
> -	list_for_each_entry_reverse(entry, list, notify_list_node) {
> +	list_for_each_entry_reverse(entry, list, list_node) {
>   		if (entry->notify_temp <= td->notify_temp) {
> -			list_add(&td->notify_list_node, &entry->notify_list_node);
> +			list_add(&td->list_node, &entry->list_node);
>   			return;
>   		}
>   	}
> -	list_add(&td->notify_list_node, list);
> +	list_add(&td->list_node, list);
>   }
>   
>   static void handle_thermal_trip(struct thermal_zone_device *tz,
> @@ -586,10 +586,10 @@ void __thermal_zone_device_update(struct
>   
>   	thermal_zone_set_trips(tz, low, high);
>   
> -	list_for_each_entry(td, &way_up_list, notify_list_node)
> +	list_for_each_entry(td, &way_up_list, list_node)
>   		thermal_trip_crossed(tz, &td->trip, governor, true);
>   
> -	list_for_each_entry_reverse(td, &way_down_list, notify_list_node)
> +	list_for_each_entry_reverse(td, &way_down_list, list_node)
>   		thermal_trip_crossed(tz, &td->trip, governor, false);
>   
>   	if (governor->manage)
> Index: linux-pm/drivers/thermal/thermal_core.h
> ===================================================================
> --- linux-pm.orig/drivers/thermal/thermal_core.h
> +++ linux-pm/drivers/thermal/thermal_core.h
> @@ -31,7 +31,7 @@ struct thermal_trip_attrs {
>   struct thermal_trip_desc {
>   	struct thermal_trip trip;
>   	struct thermal_trip_attrs trip_attrs;
> -	struct list_head notify_list_node;
> +	struct list_head list_node;
>   	struct list_head thermal_instances;
>   	int notify_temp;
>   	int threshold;
> 
> 
> 

Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>