* + drivers-rtc-rtc-r9701c-avoid-second-call-to-rtc_valid_tm.patch added to -mm tree
@ 2012-06-21 20:51 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2012-06-21 20:51 UTC (permalink / raw)
To: mm-commits; +Cc: devendra.aaru, a.zummo, agust, andreas.dumberger
The patch titled
Subject: drivers/rtc/rtc-r9701.c: avoid second call to rtc_valid_tm()
has been added to the -mm tree. Its filename is
drivers-rtc-rtc-r9701c-avoid-second-call-to-rtc_valid_tm.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Devendra Naga <devendra.aaru@gmail.com>
Subject: drivers/rtc/rtc-r9701.c: avoid second call to rtc_valid_tm()
r9701_get_datetime() calls rtc_valid_tm() and returns the value returned
by rtc_valid_tm(), which can be used in the `if', so calling
rtc_valid_tm() a second time is not required.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Andreas Dumberger <andreas.dumberger@tqs.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/rtc/rtc-r9701.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff -puN drivers/rtc/rtc-r9701.c~drivers-rtc-rtc-r9701c-avoid-second-call-to-rtc_valid_tm drivers/rtc/rtc-r9701.c
--- a/drivers/rtc/rtc-r9701.c~drivers-rtc-rtc-r9701c-avoid-second-call-to-rtc_valid_tm
+++ a/drivers/rtc/rtc-r9701.c
@@ -138,8 +138,7 @@ static int __devinit r9701_probe(struct
* contain invalid values. If so, try to write a default date:
* 2000/1/1 00:00:00
*/
- r9701_get_datetime(&spi->dev, &dt);
- if (rtc_valid_tm(&dt)) {
+ if (r9701_get_datetime(&spi->dev, &dt)) {
dev_info(&spi->dev, "trying to repair invalid date/time\n");
dt.tm_sec = 0;
dt.tm_min = 0;
_
Subject: Subject: drivers/rtc/rtc-r9701.c: avoid second call to rtc_valid_tm()
Patches currently in -mm which might be from devendra.aaru@gmail.com are
origin.patch
linux-next.patch
drivers-rtc-rtc-spearc-fix-use-after-free-in-spear_rtc_remove.patch
drivers-rtc-rtc-r9701c-avoid-second-call-to-rtc_valid_tm.patch
drivers-rtc-rtc-r9701c-check-that-r9701_set_datetime-succeeded.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-21 20:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-21 20:51 + drivers-rtc-rtc-r9701c-avoid-second-call-to-rtc_valid_tm.patch added to -mm tree akpm
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).