Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1271420 > unrolled thread

[PATCH] thermal: fix thermal_zone_bind_cooling_device prototype

Started byArnd Bergmann <arnd@arndb.de>
First post2015-11-17 17:50 +0100
Last post2015-11-24 15:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] thermal: fix thermal_zone_bind_cooling_device prototype Arnd Bergmann <arnd@arndb.de> - 2015-11-17 17:50 +0100
    Re: [PATCH] thermal: fix thermal_zone_bind_cooling_device prototype Javi Merino <javi.merino@arm.com> - 2015-11-24 15:40 +0100

#1271420 — [PATCH] thermal: fix thermal_zone_bind_cooling_device prototype

FromArnd Bergmann <arnd@arndb.de>
Date2015-11-17 17:50 +0100
Subject[PATCH] thermal: fix thermal_zone_bind_cooling_device prototype
Message-ID<qvRCa-7wq-29@gated-at.bofh.it>
When the prototype for thermal_zone_bind_cooling_device
changed, the static inline wrapper function was left alone,
which in theory can cause build warnings:

I have seen this error in the past:
drivers/thermal/db8500_thermal.c: In function 'db8500_cdev_bind':
drivers/thermal/db8500_thermal.c:78:9: error: too many arguments to function 'thermal_zone_bind_cooling_device'
   ret = thermal_zone_bind_cooling_device(thermal, i, cdev,

while this one no longer shows up, there is no doubt that
the prototype is still wrong, so let's just fix it anyway.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 6cd9e9f629f1 ("thermal: of: fix cooling device weights in device tree")

diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 4014a59828fc..613c29bd6baf 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -438,7 +438,8 @@ static inline void thermal_zone_device_unregister(
 static inline int thermal_zone_bind_cooling_device(
 	struct thermal_zone_device *tz, int trip,
 	struct thermal_cooling_device *cdev,
-	unsigned long upper, unsigned long lower)
+	unsigned long upper, unsigned long lower,
+	unsigned int weight)
 { return -ENODEV; }
 static inline int thermal_zone_unbind_cooling_device(
 	struct thermal_zone_device *tz, int trip,

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1276525

FromJavi Merino <javi.merino@arm.com>
Date2015-11-24 15:40 +0100
Message-ID<qymVc-Ro-31@gated-at.bofh.it>
In reply to#1271420
On Tue, Nov 17, 2015 at 05:48:52PM +0100, Arnd Bergmann wrote:
> When the prototype for thermal_zone_bind_cooling_device
> changed, the static inline wrapper function was left alone,
> which in theory can cause build warnings:
> 
> I have seen this error in the past:
> drivers/thermal/db8500_thermal.c: In function 'db8500_cdev_bind':
> drivers/thermal/db8500_thermal.c:78:9: error: too many arguments to function 'thermal_zone_bind_cooling_device'
>    ret = thermal_zone_bind_cooling_device(thermal, i, cdev,
> 
> while this one no longer shows up, there is no doubt that
> the prototype is still wrong, so let's just fix it anyway.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 6cd9e9f629f1 ("thermal: of: fix cooling device weights in device tree")

Yes, we forgot to fix the case for !THERMAL

Reviewed-by: Javi Merino <javi.merino@arm.com>

> diff --git a/include/linux/thermal.h b/include/linux/thermal.h
> index 4014a59828fc..613c29bd6baf 100644
> --- a/include/linux/thermal.h
> +++ b/include/linux/thermal.h
> @@ -438,7 +438,8 @@ static inline void thermal_zone_device_unregister(
>  static inline int thermal_zone_bind_cooling_device(
>  	struct thermal_zone_device *tz, int trip,
>  	struct thermal_cooling_device *cdev,
> -	unsigned long upper, unsigned long lower)
> +	unsigned long upper, unsigned long lower,
> +	unsigned int weight)
>  { return -ENODEV; }
>  static inline int thermal_zone_unbind_cooling_device(
>  	struct thermal_zone_device *tz, int trip,
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web