* [PATCH -next] rtc: mrst: remove set but not used variable 'valid'
@ 2018-08-31 2:15 YueHaibing
2018-08-31 9:17 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-08-31 2:15 UTC (permalink / raw)
To: Alessandro Zummo, Alexandre Belloni
Cc: YueHaibing, linux-rtc, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/rtc/rtc-mrst.c: In function 'mrst_procfs':
drivers/rtc/rtc-mrst.c:264:29: warning:
variable 'valid' set but not used [-Wunused-but-set-variable]
unsigned char rtc_control, valid;
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/rtc/rtc-mrst.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c
index bf2d7af..daf354a 100644
--- a/drivers/rtc/rtc-mrst.c
+++ b/drivers/rtc/rtc-mrst.c
@@ -261,11 +261,10 @@ static int mrst_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
static int mrst_procfs(struct device *dev, struct seq_file *seq)
{
- unsigned char rtc_control, valid;
+ unsigned char rtc_control;
spin_lock_irq(&rtc_lock);
rtc_control = vrtc_cmos_read(RTC_CONTROL);
- valid = vrtc_cmos_read(RTC_VALID);
spin_unlock_irq(&rtc_lock);
seq_printf(seq,
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] rtc: mrst: remove set but not used variable 'valid'
2018-08-31 2:15 [PATCH -next] rtc: mrst: remove set but not used variable 'valid' YueHaibing
@ 2018-08-31 9:17 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2018-08-31 9:17 UTC (permalink / raw)
To: YueHaibing; +Cc: Alessandro Zummo, linux-rtc, kernel-janitors
On 31/08/2018 02:15:39+0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/rtc/rtc-mrst.c: In function 'mrst_procfs':
> drivers/rtc/rtc-mrst.c:264:29: warning:
> variable 'valid' set but not used [-Wunused-but-set-variable]
> unsigned char rtc_control, valid;
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/rtc/rtc-mrst.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
Applied, thanks.
--
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:[~2018-08-31 13:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31 2:15 [PATCH -next] rtc: mrst: remove set but not used variable 'valid' YueHaibing
2018-08-31 9:17 ` 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).