Re: [PATCH] rtc: x-gene: mark PM functions as __maybe_unused

From: Alexandre Belloni
Date: Wed Nov 08 2017 - 19:18:12 EST


On 08/11/2017 at 13:08:10 +0100, Arnd Bergmann wrote:
> The new xgene_rtc_alarm_irq_enabled() function is only accessed
> from PM code, which is inside of an #ifdef; this causes a harmless
> build warning when CONFIG_PM is disabled:
>
> drivers/rtc/rtc-xgene.c:108:12: error: 'xgene_rtc_alarm_irq_enabled' defined but not used [-Werror=unused-function]
>
> Just remove the #ifdef and use __maybe_unused annotations instead,
> to make the code more robust here.
>
> Fixes: 9f8f1c8b727d ("rtc: Fix suspend/resume for APM X-Gene SoC RTC driver")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> ---
> drivers/rtc/rtc-xgene.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
Applied, thanks.

--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com