]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
thermal: spear: use __maybe_unused for PM functions
authorArnd Bergmann <arnd@arndb.de>
Mon, 25 Jan 2016 16:44:10 +0000 (17:44 +0100)
committerSasha Levin <alexander.levin@microsoft.com>
Sun, 4 Mar 2018 15:28:29 +0000 (10:28 -0500)
commit3536d699d0325e5087592677347d0ee9ea4e696c
treeeff6689d11d280cef4edb503faf7c4a18d8edf99
parentc81419613c45dfb869ac29a64f00d35dc7118d31
thermal: spear: use __maybe_unused for PM functions

[ Upstream commit d612c64d1f4d6b2464993dfeafd9ec319f774188 ]

The spear thermal driver hides its suspend/resume function conditionally
based on CONFIG_PM, but references them based on CONFIG_PM_SLEEP, so
we get a warning if the former is set but the latter is not:

thermal/spear_thermal.c:58:12: warning: 'spear_thermal_suspend' defined but not used [-Wunused-function]
thermal/spear_thermal.c:75:12: warning: 'spear_thermal_resume' defined but not used [-Wunused-function]

This removes the #ifdef and instead uses a __maybe_uninitialized
annotation to avoid the warning and improve compile-time coverage.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/thermal/spear_thermal.c