From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: linux-rtc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Joshua Kinard <kumba@gentoo.org>
Subject: [PATCH 3/8] rtc: ds1685: remove set but unused variables
Date: Fri, 22 Nov 2019 11:22:07 +0100 [thread overview]
Message-ID: <20191122102212.400158-4-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20191122102212.400158-1-alexandre.belloni@bootlin.com>
Fix the following warnings:
drivers/rtc/rtc-ds1685.c: In function ‘ds1685_rtc_read_time’:
drivers/rtc/rtc-ds1685.c:264:5: warning: variable ‘ctrlb’ set but not used [-Wunused-but-set-variable]
264 | u8 ctrlb, century;
| ^~~~~
drivers/rtc/rtc-ds1685.c: In function ‘ds1685_rtc_proc’:
drivers/rtc/rtc-ds1685.c:758:19: warning: variable ‘ctrlc’ set but not used [-Wunused-but-set-variable]
758 | u8 ctrla, ctrlb, ctrlc, ctrld, ctrl4a, ctrl4b, ssn[8];
| ^~~~~
Cc: Joshua Kinard <kumba@gentoo.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-ds1685.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/rtc-ds1685.c b/drivers/rtc/rtc-ds1685.c
index 98d06b3ee913..8419595e7da7 100644
--- a/drivers/rtc/rtc-ds1685.c
+++ b/drivers/rtc/rtc-ds1685.c
@@ -261,7 +261,7 @@ static int
ds1685_rtc_read_time(struct device *dev, struct rtc_time *tm)
{
struct ds1685_priv *rtc = dev_get_drvdata(dev);
- u8 ctrlb, century;
+ u8 century;
u8 seconds, minutes, hours, wday, mday, month, years;
/* Fetch the time info from the RTC registers. */
@@ -274,7 +274,6 @@ ds1685_rtc_read_time(struct device *dev, struct rtc_time *tm)
month = rtc->read(rtc, RTC_MONTH);
years = rtc->read(rtc, RTC_YEAR);
century = rtc->read(rtc, RTC_CENTURY);
- ctrlb = rtc->read(rtc, RTC_CTRL_B);
ds1685_rtc_end_data_access(rtc);
/* bcd2bin if needed, perform fixups, and store to rtc_time. */
@@ -755,7 +754,7 @@ static int
ds1685_rtc_proc(struct device *dev, struct seq_file *seq)
{
struct ds1685_priv *rtc = dev_get_drvdata(dev);
- u8 ctrla, ctrlb, ctrlc, ctrld, ctrl4a, ctrl4b, ssn[8];
+ u8 ctrla, ctrlb, ctrld, ctrl4a, ctrl4b, ssn[8];
char *model;
/* Read all the relevant data from the control registers. */
@@ -763,7 +762,6 @@ ds1685_rtc_proc(struct device *dev, struct seq_file *seq)
ds1685_rtc_get_ssn(rtc, ssn);
ctrla = rtc->read(rtc, RTC_CTRL_A);
ctrlb = rtc->read(rtc, RTC_CTRL_B);
- ctrlc = rtc->read(rtc, RTC_CTRL_C);
ctrld = rtc->read(rtc, RTC_CTRL_D);
ctrl4a = rtc->read(rtc, RTC_EXT_CTRL_4A);
ctrl4b = rtc->read(rtc, RTC_EXT_CTRL_4B);
--
2.23.0
next prev parent reply other threads:[~2019-11-22 10:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-22 10:22 [PATCH 0/8] rtc: fix W=1 warnings and errors Alexandre Belloni
2019-11-22 10:22 ` [PATCH 1/8] rtc: sysfs: fix hctosys_show kerneldoc Alexandre Belloni
2019-11-22 10:22 ` [PATCH 2/8] rtc: ds1374: remove unused variable Alexandre Belloni
2019-11-22 10:22 ` Alexandre Belloni [this message]
2019-11-23 5:16 ` [PATCH 3/8] rtc: ds1685: remove set but unused variables Joshua Kinard
2019-11-22 10:22 ` [PATCH 4/8] rtc: ds1685: fix build error with make W=1 Alexandre Belloni
2019-11-23 5:19 ` Joshua Kinard
2019-11-26 21:16 ` Alexandre Belloni
2019-11-22 10:22 ` [PATCH 5/8] rtc: m41t80: remove excess kerneldoc Alexandre Belloni
2019-11-22 10:22 ` [PATCH 6/8] rtc: pm8xxx: update kerneldoc for struct pm8xxx_rtc Alexandre Belloni
2019-11-22 10:22 ` [PATCH 7/8] rtc: tegra: remove set but unused variable Alexandre Belloni
2019-11-22 12:46 ` Thierry Reding
2019-11-22 10:22 ` [PATCH 8/8] rtc: v3020: " Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191122102212.400158-4-alexandre.belloni@bootlin.com \
--to=alexandre.belloni@bootlin.com \
--cc=kumba@gentoo.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®