ath11k: fix missing return in ath11k_thermal_set_throttling
Subsystems (3)
PATCH 1/2 ath11k: fix missing return in ath11k_thermal_set_throttling
The empty stub version of this function causes a compile-time warning:
In file included from drivers/net/wireless/ath/ath11k/core.h:23,
from drivers/net/wireless/ath/ath11k/dp_rx.h:8,
from drivers/net/wireless/ath/ath11k/ce.c:6:drivers/net/wireless/ath/ath11k/thermal.h: In function 'ath11k_thermal_set_throttling':drivers/net/wireless/ath/ath11k/thermal.h:45:1: error: no return statement in function returning non-void [-Werror=return-type]
Just return success here.
--- drivers/net/wireless/ath/ath11k/thermal.h | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath11k/thermal.h +1 -0
@@ -42,6 +42,7 @@ static inline void ath11k_thermal_unregister(struct ath11k *ar)static inline int ath11k_thermal_set_throttling (struct ath11k *ar,u32 throttle_state) { +return 0 ; } static inline void ath11k_thermal_event_temperature(struct ath11k *ar,
Signature · 7 lines
2.26.0 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
PATCH 2/2 ath11k: fix ath11k_thermal_unregister() prototype
The stub function has the wrong prototype, causing a warning:
drivers/net/wireless/ath/ath11k/core.c: In function 'ath11k_core_pdev_destroy':drivers/net/wireless/ath/ath11k/core.c:416:28: error: passing argument 1 of 'ath11k_thermal_unregister' from incompatible pointer type [-Werror=incompatible-pointer-types]
Change it to take the same arguments as the normal implementation.
--- drivers/net/wireless/ath/ath11k/thermal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath11k/thermal.h +1 -1
@@ -36,7 +36,7 @@ static inline int ath11k_thermal_register(struct ath11k_base *sc)return 0 ; } -static inline void ath11k_thermal_unregister (struct ath11k *ar) +static inline void ath11k_thermal_unregister (struct ath11k_base *ar) { }
Signature · 7 lines
2.26.0 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 2/2] ath11k: fix ath11k_thermal_unregister() prototype
Quoted 18 lines · Arnd Bergmann
The stub function has the wrong prototype, causing a warning:
drivers/net/wireless/ath/ath11k/core.c: In function 'ath11k_core_pdev_destroy':drivers/net/wireless/ath/ath11k/core.c:416:28: error: passing argument 1 of 'ath11k_thermal_unregister' from incompatible pointer type [-Werror=incompatible-pointer-types]Change it to take the same arguments as the normal implementation.
Fixes 2a63bbca06b2 ("ath11k: add thermal cooling device support")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/net/wireless/ath/ath11k/thermal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/ath/ath11k/thermal.h +0
-0
drivers/net/wireless/ath/ath11k/thermal.h static inline int ath11k_thermal_register(struct ath11k_base *sc) · line 41
Quoted 7 lines
drivers/net/wireless/ath/ath11k/thermal.h +1
-1@@ -36,7 +36,7 @@ static inline int ath11k_thermal_register(struct ath11k_base *sc)return 0 ; } -static inline void ath11k_thermal_unregister (struct ath11k *ar) +static inline void ath11k_thermal_unregister (struct ath11k_base *ar) { }
Already fixed by this commit:
Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 22 lines · Arnd Bergmann
The empty stub version of this function causes a compile-time warning:
In file included from
drivers/net/wireless/ath/ath11k/core.h:23,from drivers/net/wireless/ath/ath11k/dp_rx.h:8, from drivers/net/wireless/ath/ath11k/ce.c:6:
drivers/net/wireless/ath/ath11k/thermal.h: In function 'ath11k_thermal_set_throttling':drivers/net/wireless/ath/ath11k/thermal.h:45:1: error: no return statement in function returning non-void [-Werror=return-type]Just return success here.
Fixes a41d10348b01 ("ath11k: add thermal sensor device support")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/net/wireless/ath/ath11k/thermal.h | 1 + 1 file changed, 1 insertion(+)drivers/net/wireless/ath/ath11k/thermal.h +0
-0
drivers/net/wireless/ath/ath11k/thermal.h static inline void ath11k_thermal_unregister(struct ath11k *ar) · line 46
Quoted 5 lines
drivers/net/wireless/ath/ath11k/thermal.h +1
-0@@ -42,6 +42,7 @@ static inline void ath11k_thermal_unregister(struct ath11k *ar)static inline int ath11k_thermal_set_throttling (struct ath11k *ar,u32 throttle_state) { +return 0 ; }
Already fixed by this commit:
Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches