summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ds1286.c
diff options
context:
space:
mode:
authorDevendra Naga <devendra.aaru@gmail.com>2013-04-29 16:19:20 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 18:28:28 -0700
commitcb72f60c17aea5f0bdd546420ebb16075d965f92 (patch)
treec4e66b880c71d31db0320b92ec77405620386157 /drivers/rtc/rtc-ds1286.c
parentbc862f44cb49f401b05d7fc2a400209c97535a28 (diff)
downloadlinux-cb72f60c17aea5f0bdd546420ebb16075d965f92.tar.bz2
drivers/rtc/rtc-ds1286.c: fix compiler warning while doing make W=1
below is the warning reported with the gcc (gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)) with make W=1: drivers/rtc/rtc-ds1286.c: In function `ds1286_read_alarm': drivers/rtc/rtc-ds1286.c:273:16: warning: variable `cmd' set but not used [-Wunused-but-set-variable] fixed by removing the variable Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-ds1286.c')
-rw-r--r--drivers/rtc/rtc-ds1286.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-ds1286.c b/drivers/rtc/rtc-ds1286.c
index d989412a348a..d120cb8bfcbe 100644
--- a/drivers/rtc/rtc-ds1286.c
+++ b/drivers/rtc/rtc-ds1286.c
@@ -270,7 +270,6 @@ static int ds1286_set_time(struct device *dev, struct rtc_time *tm)
static int ds1286_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
{
struct ds1286_priv *priv = dev_get_drvdata(dev);
- unsigned char cmd;
unsigned long flags;
/*
@@ -281,7 +280,7 @@ static int ds1286_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
alm->time.tm_min = ds1286_rtc_read(priv, RTC_MINUTES_ALARM) & 0x7f;
alm->time.tm_hour = ds1286_rtc_read(priv, RTC_HOURS_ALARM) & 0x1f;
alm->time.tm_wday = ds1286_rtc_read(priv, RTC_DAY_ALARM) & 0x07;
- cmd = ds1286_rtc_read(priv, RTC_CMD);
+ ds1286_rtc_read(priv, RTC_CMD);
spin_unlock_irqrestore(&priv->lock, flags);
alm->time.tm_min = bcd2bin(alm->time.tm_min);