lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 24 Jun 2010 16:41:36 +0800
From:	Wan ZongShun <mcuos.com@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	rtc-linux <rtc-linux@...glegroups.com>,
	Alessandro Zummo <a.zummo@...ertech.it>
Subject: [PATCH 1/3] RTC/nuc900: make returning time checking function valid

This patch is to make returning time checking function valid.
In spite of using the 'rtc_valid_tm', nevertheless, the read time function
omits its returning value, that means the 'rtc_valid_tm' is useless here.

Signed-off-by: Wan ZongShun <mcuos.com@...il.com>

---
 drivers/rtc/rtc-nuc900.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c
index 20bc70b..84336d1 100644
--- a/drivers/rtc/rtc-nuc900.c
+++ b/drivers/rtc/rtc-nuc900.c
@@ -102,7 +102,7 @@ static int *check_rtc_access_enable(struct nuc900_rtc *nuc900_rtc)
 	return 0;
 }

-static void nuc900_rtc_bcd2bin(unsigned int timereg,
+static int nuc900_rtc_bcd2bin(unsigned int timereg,
 				unsigned int calreg, struct rtc_time *tm)
 {
 	tm->tm_mday	= bcd2bin(calreg >> 0);
@@ -113,7 +113,7 @@ static void nuc900_rtc_bcd2bin(unsigned int timereg,
 	tm->tm_min	= bcd2bin(timereg >> 8);
 	tm->tm_hour	= bcd2bin(timereg >> 16);

-	rtc_valid_tm(tm);
+	return rtc_valid_tm(tm);
 }

 static void nuc900_rtc_bin2bcd(struct device *dev, struct rtc_time *settm,
@@ -170,9 +170,7 @@ static int nuc900_rtc_read_time(struct device *dev, struct rtc_time *tm)
 	timeval = __raw_readl(rtc->rtc_reg + REG_RTC_TLR);
 	clrval	= __raw_readl(rtc->rtc_reg + REG_RTC_CLR);

-	nuc900_rtc_bcd2bin(timeval, clrval, tm);
-
-	return 0;
+	return nuc900_rtc_bcd2bin(timeval, clrval, tm);
 }

 static int nuc900_rtc_set_time(struct device *dev, struct rtc_time *tm)
@@ -205,9 +203,7 @@ static int nuc900_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 	timeval = __raw_readl(rtc->rtc_reg + REG_RTC_TAR);
 	carval	= __raw_readl(rtc->rtc_reg + REG_RTC_CAR);

-	nuc900_rtc_bcd2bin(timeval, carval, &alrm->time);
-
-	return 0;
+	return nuc900_rtc_bcd2bin(timeval, carval, &alrm->time);
 }

 static int nuc900_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
-- 
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ