[PATCH 4/5] hwmon: (gpio-fan) Remove unnecessary comment

Alexander Stein posted 5 patches 10 months, 1 week ago
[PATCH 4/5] hwmon: (gpio-fan) Remove unnecessary comment
Posted by Alexander Stein 10 months, 1 week ago
__set_fan_ctrl() is only called by set_fan_speed(), which ensures
fan_data->lock is held already.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
 drivers/hwmon/gpio-fan.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index 322b161d5ca1f..4614d0ad86b3a 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -100,7 +100,6 @@ static int fan_alarm_init(struct gpio_fan_data *fan_data)
  * Control GPIOs.
  */
 
-/* Must be called with fan_data->lock held, except during initialization. */
 static void __set_fan_ctrl(struct gpio_fan_data *fan_data, int ctrl_val)
 {
 	int i;
-- 
2.34.1
Re: [PATCH 4/5] hwmon: (gpio-fan) Remove unnecessary comment
Posted by Guenter Roeck 9 months, 2 weeks ago
On Mon, Feb 10, 2025 at 03:59:32PM +0100, Alexander Stein wrote:
> __set_fan_ctrl() is only called by set_fan_speed(), which ensures
> fan_data->lock is held already.
> 

The comment is still valid, and it does not hurt to have it.

Guenter

> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
>  drivers/hwmon/gpio-fan.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
> index 322b161d5ca1f..4614d0ad86b3a 100644
> --- a/drivers/hwmon/gpio-fan.c
> +++ b/drivers/hwmon/gpio-fan.c
> @@ -100,7 +100,6 @@ static int fan_alarm_init(struct gpio_fan_data *fan_data)
>   * Control GPIOs.
>   */
>  
> -/* Must be called with fan_data->lock held, except during initialization. */
>  static void __set_fan_ctrl(struct gpio_fan_data *fan_data, int ctrl_val)
>  {
>  	int i;