Commit 47401580 authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: ds1685: remove set but unused variables

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>
Acked-By: default avatarJoshua Kinard <kumba@gentoo.org>
Link: https://lore.kernel.org/r/20191122102212.400158-4-alexandre.belloni@bootlin.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 75859ab1
...@@ -261,7 +261,7 @@ static int ...@@ -261,7 +261,7 @@ static int
ds1685_rtc_read_time(struct device *dev, struct rtc_time *tm) ds1685_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ {
struct ds1685_priv *rtc = dev_get_drvdata(dev); struct ds1685_priv *rtc = dev_get_drvdata(dev);
u8 ctrlb, century; u8 century;
u8 seconds, minutes, hours, wday, mday, month, years; u8 seconds, minutes, hours, wday, mday, month, years;
/* Fetch the time info from the RTC registers. */ /* Fetch the time info from the RTC registers. */
...@@ -274,7 +274,6 @@ ds1685_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -274,7 +274,6 @@ ds1685_rtc_read_time(struct device *dev, struct rtc_time *tm)
month = rtc->read(rtc, RTC_MONTH); month = rtc->read(rtc, RTC_MONTH);
years = rtc->read(rtc, RTC_YEAR); years = rtc->read(rtc, RTC_YEAR);
century = rtc->read(rtc, RTC_CENTURY); century = rtc->read(rtc, RTC_CENTURY);
ctrlb = rtc->read(rtc, RTC_CTRL_B);
ds1685_rtc_end_data_access(rtc); ds1685_rtc_end_data_access(rtc);
/* bcd2bin if needed, perform fixups, and store to rtc_time. */ /* bcd2bin if needed, perform fixups, and store to rtc_time. */
...@@ -755,7 +754,7 @@ static int ...@@ -755,7 +754,7 @@ static int
ds1685_rtc_proc(struct device *dev, struct seq_file *seq) ds1685_rtc_proc(struct device *dev, struct seq_file *seq)
{ {
struct ds1685_priv *rtc = dev_get_drvdata(dev); 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; char *model;
/* Read all the relevant data from the control registers. */ /* Read all the relevant data from the control registers. */
...@@ -763,7 +762,6 @@ ds1685_rtc_proc(struct device *dev, struct seq_file *seq) ...@@ -763,7 +762,6 @@ ds1685_rtc_proc(struct device *dev, struct seq_file *seq)
ds1685_rtc_get_ssn(rtc, ssn); ds1685_rtc_get_ssn(rtc, ssn);
ctrla = rtc->read(rtc, RTC_CTRL_A); ctrla = rtc->read(rtc, RTC_CTRL_A);
ctrlb = rtc->read(rtc, RTC_CTRL_B); ctrlb = rtc->read(rtc, RTC_CTRL_B);
ctrlc = rtc->read(rtc, RTC_CTRL_C);
ctrld = rtc->read(rtc, RTC_CTRL_D); ctrld = rtc->read(rtc, RTC_CTRL_D);
ctrl4a = rtc->read(rtc, RTC_EXT_CTRL_4A); ctrl4a = rtc->read(rtc, RTC_EXT_CTRL_4A);
ctrl4b = rtc->read(rtc, RTC_EXT_CTRL_4B); ctrl4b = rtc->read(rtc, RTC_EXT_CTRL_4B);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment