Skip to contentSkip to conversation

thermal: fix thermal_zone_bind_cooling_device prototype

PATCH In review Arnd Bergmann 2 participants 2 messages Nov 17, 2015 – Nov 24, 2015 Thermal

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal: fix thermal_zone_bind_cooling_device prototype

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.

Fixes 6cd9e9f629f1 ("thermal: of: fix cooling device weights in device tree")
include/linux/thermal.h +2 -1
index 4014a59828fc..613c29bd6baf 100644
@@ -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,
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Arnd Bergmann

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,

Quoted 5 lines

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

Fixes 6cd9e9f629f1 ("thermal: of: fix cooling device weights in device tree")

Yes, we forgot to fix the case for !THERMAL

Quoted 21 lines
include/linux/thermal.h +2 -2
index 4014a59828fc..613c29bd6baf 100644
@@ -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 at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/