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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7bdb20ca-9baf-9d2e-1f3d-cc52a5645c8b@roeck-us.net>
Date:   Mon, 11 Jan 2021 06:55:51 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Daniel Lezcano <daniel.lezcano@...aro.org>, rui.zhang@...el.com
Cc:     Kamil Debski <kamil@...as.org>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Jean Delvare <jdelvare@...e.com>,
        Amit Kucheria <amitk@...nel.org>,
        "open list:PWM FAN DRIVER" <linux-hwmon@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:THERMAL" <linux-pm@...r.kernel.org>
Subject: Re: [PATCH] thermal/core: Make cooling device state change private

On 1/11/21 6:13 AM, Daniel Lezcano wrote:
> The change of the cooling device state should be used by the governor
> or at least by the core code, not by the drivers themselves.
> 
> Remove the API usage and move the function declaration to the internal
> headers.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>

Acked-by: Guenter Roeck <linux@...ck-us.net>

> ---
>  drivers/hwmon/pwm-fan.c        | 1 -
>  drivers/thermal/thermal_core.h | 2 ++
>  include/linux/thermal.h        | 3 ---
>  3 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
> index bdba2143021a..0b1159ceac9b 100644
> --- a/drivers/hwmon/pwm-fan.c
> +++ b/drivers/hwmon/pwm-fan.c
> @@ -378,7 +378,6 @@ static int pwm_fan_probe(struct platform_device *pdev)
>  			return ret;
>  		}
>  		ctx->cdev = cdev;
> -		thermal_cdev_update(cdev);
>  	}
>  
>  	return 0;
> diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
> index 90f9a80c8b23..86b8cef7310e 100644
> --- a/drivers/thermal/thermal_core.h
> +++ b/drivers/thermal/thermal_core.h
> @@ -65,6 +65,8 @@ static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev)
>  		cdev->ops->power2state;
>  }
>  
> +void thermal_cdev_update(struct thermal_cooling_device *);
> +
>  /**
>   * struct thermal_trip - representation of a point in temperature domain
>   * @np: pointer to struct device_node that this trip point was created from
> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index 1e686404951b..6ac7bb1d2b1f 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -390,7 +390,6 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp);
>  int thermal_zone_get_slope(struct thermal_zone_device *tz);
>  int thermal_zone_get_offset(struct thermal_zone_device *tz);
>  
> -void thermal_cdev_update(struct thermal_cooling_device *);
>  void thermal_notify_framework(struct thermal_zone_device *, int);
>  int thermal_zone_device_enable(struct thermal_zone_device *tz);
>  int thermal_zone_device_disable(struct thermal_zone_device *tz);
> @@ -437,8 +436,6 @@ static inline int thermal_zone_get_offset(
>  		struct thermal_zone_device *tz)
>  { return -ENODEV; }
>  
> -static inline void thermal_cdev_update(struct thermal_cooling_device *cdev)
> -{ }
>  static inline void thermal_notify_framework(struct thermal_zone_device *tz,
>  	int trip)
>  { }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ