linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: sh: fix unused variable warning
@ 2019-03-25 10:24 Anders Roxell
  2019-03-25 10:47 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Anders Roxell @ 2019-03-25 10:24 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni; +Cc: linux-rtc, linux-kernel, 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;
                  ^

Remove the declaration of the unused varable 'r'.

Fixes: 373f7f4bf4a5 ("rtc: sh: stop resetting time to epoch")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/rtc/rtc-sh.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/rtc/rtc-sh.c b/drivers/rtc/rtc-sh.c
index d72ee3a841ea..579b3ff5c644 100644
--- a/drivers/rtc/rtc-sh.c
+++ b/drivers/rtc/rtc-sh.c
@@ -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;
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtc: sh: fix unused variable warning
  2019-03-25 10:24 [PATCH] rtc: sh: fix unused variable warning Anders Roxell
@ 2019-03-25 10:47 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2019-03-25 10:47 UTC (permalink / raw)
  To: Anders Roxell; +Cc: a.zummo, linux-rtc, linux-kernel

On 25/03/2019 11:24:53+0100, Anders Roxell wrote:
> 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")
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>  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.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-25 10:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-25 10:24 [PATCH] rtc: sh: fix unused variable warning Anders Roxell
2019-03-25 10:47 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).