drivers/thermal/thermal_core.c | 10 ++++------ include/linux/thermal.h | 8 -------- 2 files changed, 4 insertions(+), 14 deletions(-)
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Since thermal_bind_cdev_to_trip() and thermal_unbind_cdev_from_trip()
are only called locally in the thermal core now, they can be static,
so change their definitions accordingly and drop their headers from
the global thermal header file.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
v2 -> v3: Rebase after dropping patches [04-05/17] from the series
v1 -> v2: No changes
---
drivers/thermal/thermal_core.c | 10 ++++------
include/linux/thermal.h | 8 --------
2 files changed, 4 insertions(+), 14 deletions(-)
Index: linux-pm/drivers/thermal/thermal_core.c
===================================================================
--- linux-pm.orig/drivers/thermal/thermal_core.c
+++ linux-pm/drivers/thermal/thermal_core.c
@@ -773,7 +773,7 @@ struct thermal_zone_device *thermal_zone
*
* Return: 0 on success, the proper error value otherwise.
*/
-int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
+static int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
const struct thermal_trip *trip,
struct thermal_cooling_device *cdev,
unsigned long upper, unsigned long lower,
@@ -877,7 +877,6 @@ free_mem:
kfree(dev);
return result;
}
-EXPORT_SYMBOL_GPL(thermal_bind_cdev_to_trip);
int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
int trip_index,
@@ -913,9 +912,9 @@ EXPORT_SYMBOL_GPL(thermal_zone_bind_cool
*
* Return: 0 on success, the proper error value otherwise.
*/
-int thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
- const struct thermal_trip *trip,
- struct thermal_cooling_device *cdev)
+static int thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
+ const struct thermal_trip *trip,
+ struct thermal_cooling_device *cdev)
{
struct thermal_instance *pos, *next;
@@ -945,7 +944,6 @@ unbind:
kfree(pos);
return 0;
}
-EXPORT_SYMBOL_GPL(thermal_unbind_cdev_from_trip);
int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz,
int trip_index,
Index: linux-pm/include/linux/thermal.h
===================================================================
--- linux-pm.orig/include/linux/thermal.h
+++ linux-pm/include/linux/thermal.h
@@ -247,18 +247,10 @@ const char *thermal_zone_device_type(str
int thermal_zone_device_id(struct thermal_zone_device *tzd);
struct device *thermal_zone_device(struct thermal_zone_device *tzd);
-int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
- const struct thermal_trip *trip,
- struct thermal_cooling_device *cdev,
- unsigned long upper, unsigned long lower,
- unsigned int weight);
int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
struct thermal_cooling_device *,
unsigned long, unsigned long,
unsigned int);
-int thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
- const struct thermal_trip *trip,
- struct thermal_cooling_device *cdev);
int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
struct thermal_cooling_device *);
void thermal_zone_device_update(struct thermal_zone_device *,
On 19/08/2024 18:05, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > Since thermal_bind_cdev_to_trip() and thermal_unbind_cdev_from_trip() > are only called locally in the thermal core now, they can be static, > so change their definitions accordingly and drop their headers from > the global thermal header file. > > No intentional functional impact. > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-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
在 2024/8/20 0:05, Rafael J. Wysocki 写道:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Since thermal_bind_cdev_to_trip() and thermal_unbind_cdev_from_trip()
> are only called locally in the thermal core now, they can be static,
> so change their definitions accordingly and drop their headers from
> the global thermal header file.
The thermal_bind_cdev_to_trip() and thermal_unbind_cdev_from_trip() are
used by acpi/thermal.c.
I guess that the patch [07/14] I didn't receive must have done that.
If so, I'd like add:
Acked-by: Huisong Li <lihuisong@huawei.com>
>
> No intentional functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>
> v2 -> v3: Rebase after dropping patches [04-05/17] from the series
>
> v1 -> v2: No changes
>
> ---
> drivers/thermal/thermal_core.c | 10 ++++------
> include/linux/thermal.h | 8 --------
> 2 files changed, 4 insertions(+), 14 deletions(-)
>
> Index: linux-pm/drivers/thermal/thermal_core.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/thermal_core.c
> +++ linux-pm/drivers/thermal/thermal_core.c
> @@ -773,7 +773,7 @@ struct thermal_zone_device *thermal_zone
> *
> * Return: 0 on success, the proper error value otherwise.
> */
> -int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
> +static int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
> const struct thermal_trip *trip,
> struct thermal_cooling_device *cdev,
> unsigned long upper, unsigned long lower,
> @@ -877,7 +877,6 @@ free_mem:
> kfree(dev);
> return result;
> }
> -EXPORT_SYMBOL_GPL(thermal_bind_cdev_to_trip);
>
> int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
> int trip_index,
> @@ -913,9 +912,9 @@ EXPORT_SYMBOL_GPL(thermal_zone_bind_cool
> *
> * Return: 0 on success, the proper error value otherwise.
> */
> -int thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
> - const struct thermal_trip *trip,
> - struct thermal_cooling_device *cdev)
> +static int thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
> + const struct thermal_trip *trip,
> + struct thermal_cooling_device *cdev)
> {
> struct thermal_instance *pos, *next;
>
> @@ -945,7 +944,6 @@ unbind:
> kfree(pos);
> return 0;
> }
> -EXPORT_SYMBOL_GPL(thermal_unbind_cdev_from_trip);
>
> int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz,
<...>
>
>
>
>
> .
On Mon, 2024-08-19 at 18:05 +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Since thermal_bind_cdev_to_trip() and thermal_unbind_cdev_from_trip()
> are only called locally in the thermal core now, they can be static,
> so change their definitions accordingly and drop their headers from
> the global thermal header file.
>
> No intentional functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
thanks,
rui
> ---
>
> v2 -> v3: Rebase after dropping patches [04-05/17] from the series
>
> v1 -> v2: No changes
>
> ---
> drivers/thermal/thermal_core.c | 10 ++++------
> include/linux/thermal.h | 8 --------
> 2 files changed, 4 insertions(+), 14 deletions(-)
>
> Index: linux-pm/drivers/thermal/thermal_core.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/thermal_core.c
> +++ linux-pm/drivers/thermal/thermal_core.c
> @@ -773,7 +773,7 @@ struct thermal_zone_device *thermal_zone
> *
> * Return: 0 on success, the proper error value otherwise.
> */
> -int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
> +static int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
> const struct thermal_trip *trip,
> struct thermal_cooling_device
> *cdev,
> unsigned long upper, unsigned
> long lower,
> @@ -877,7 +877,6 @@ free_mem:
> kfree(dev);
> return result;
> }
> -EXPORT_SYMBOL_GPL(thermal_bind_cdev_to_trip);
>
> int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
> int trip_index,
> @@ -913,9 +912,9 @@ EXPORT_SYMBOL_GPL(thermal_zone_bind_cool
> *
> * Return: 0 on success, the proper error value otherwise.
> */
> -int thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
> - const struct thermal_trip *trip,
> - struct thermal_cooling_device
> *cdev)
> +static int thermal_unbind_cdev_from_trip(struct thermal_zone_device
> *tz,
> + const struct thermal_trip
> *trip,
> + struct
> thermal_cooling_device *cdev)
> {
> struct thermal_instance *pos, *next;
>
> @@ -945,7 +944,6 @@ unbind:
> kfree(pos);
> return 0;
> }
> -EXPORT_SYMBOL_GPL(thermal_unbind_cdev_from_trip);
>
> int thermal_zone_unbind_cooling_device(struct thermal_zone_device
> *tz,
> int trip_index,
> Index: linux-pm/include/linux/thermal.h
> ===================================================================
> --- linux-pm.orig/include/linux/thermal.h
> +++ linux-pm/include/linux/thermal.h
> @@ -247,18 +247,10 @@ const char *thermal_zone_device_type(str
> int thermal_zone_device_id(struct thermal_zone_device *tzd);
> struct device *thermal_zone_device(struct thermal_zone_device *tzd);
>
> -int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
> - const struct thermal_trip *trip,
> - struct thermal_cooling_device *cdev,
> - unsigned long upper, unsigned long
> lower,
> - unsigned int weight);
> int thermal_zone_bind_cooling_device(struct thermal_zone_device *,
> int,
> struct thermal_cooling_device *,
> unsigned long, unsigned long,
> unsigned int);
> -int thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
> - const struct thermal_trip *trip,
> - struct thermal_cooling_device
> *cdev);
> int thermal_zone_unbind_cooling_device(struct thermal_zone_device *,
> int,
> struct thermal_cooling_device
> *);
> void thermal_zone_device_update(struct thermal_zone_device *,
>
>
>
© 2016 - 2026 Red Hat, Inc.