Skip to contentSkip to conversation

rtc: sh: fix unused variable warning

PATCH In review Anders Roxell 2 participants 2 messages Mar 25, 2019 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: sh: fix unused variable warning

When building the driver rtc/rtc-sh a warning about unused variable shows up:

../drivers/rtc/rtc-sh.c: In function ‘sh_rtc_probe’:
../drivers/rtc/rtc-sh.c:472:18: warning: unused variable ‘r’ [-Wunused-variable]

  struct rtc_time r;
                  ^

Remove the declaration of the unused varable 'r'.

Fixes 373f7f4bf4a5 ("rtc: sh: stop resetting time to epoch")
---
 drivers/rtc/rtc-sh.c | 1 -
 1 file changed, 1 deletion(-)
drivers/rtc/rtc-sh.c +0 -1
index d72ee3a841ea..579b3ff5c644 100644
@@ -469,7 +469,6 @@ static int __init sh_rtc_probe(struct platform_device *pdev)
 {
 	struct sh_rtc *rtc;
 	struct resource *res;
-	struct rtc_time r;
 	char clk_name[6];
 	int clk_id, ret;
 
Signature · 1 line
2.20.1
#1 lore raw
Quoted 8 lines · Anders Roxell

When building the driver rtc/rtc-sh a warning about unused variable shows up:

../drivers/rtc/rtc-sh.c: In function ‘sh_rtc_probe’:
../drivers/rtc/rtc-sh.c:472:18: warning: unused variable ‘r’ [-Wunused-variable]

  struct rtc_time r;
                  ^
Quoted 8 lines

Remove the declaration of the unused varable 'r'.

Fixes 373f7f4bf4a5 ("rtc: sh: stop resetting time to epoch")
---
 drivers/rtc/rtc-sh.c | 1 -
 1 file changed, 1 deletion(-)

Thanks, I've squashed it in the original commit as it is not yet in any release and its hash may still change.

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com