Re: [PATCH] rtc: sh: remove unused variable rtc_dev

From: Alexandre Belloni
Date: Fri Jul 27 2018 - 11:28:22 EST


On 27/07/2018 17:10:15+0200, Anders Roxell wrote:
> When building rtc-sh, rtc_dev isn't used in function __sh_rtc_periodic.
> drivers/rtc/rtc-sh.c: In function â__sh_rtc_periodicâ:
> drivers/rtc/rtc-sh.c:146:21: warning: unused variable ârtc_devâ [-Wunused-variable]
> struct rtc_device *rtc_dev = rtc->rtc_dev;
> ^~~~~~~
> Remove the declaration of rtc_dev to dispose the warning.
>
> Fixes: ec623ff014c4 ("rtc: sh: remove dead code")
> Signed-off-by: Anders Roxell <anders.roxell@xxxxxxxxxx>
> ---
> drivers/rtc/rtc-sh.c | 1 -
> 1 file changed, 1 deletion(-)
>
Applied, thanks.

It is weird that kbuild didn't complain about it though.

--
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com