• Arnd Bergmann's avatar
    thermal: spear: use __maybe_unused for PM functions · d612c64d
    Arnd Bergmann authored
    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: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
spear_thermal.c 5.13 KB