All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xunlei Pang <xlpang@126.com>
To: linux-kernel@vger.kernel.org
Cc: rtc-linux@googlegroups.com, Thomas Gleixner <tglx@linutronix.de>,
	Alessandro Zummo <a.zummo@towertech.it>,
	John Stultz <john.stultz@linaro.org>,
	Arnd Bergmann <arnd.bergmann@linaro.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Xunlei Pang <pang.xunlei@linaro.org>
Subject: [PATCH v5 4/4] rtc: Remove redundant rtc_valid_tm() from rtc_resume()
Date: Mon,  9 Mar 2015 14:27:51 +0800	[thread overview]
Message-ID: <1425882471-5591-4-git-send-email-xlpang@126.com> (raw)
In-Reply-To: <1425882471-5591-1-git-send-email-xlpang@126.com>

From: Xunlei Pang <pang.xunlei@linaro.org>

rtc_read_time() has already judged valid tm by rtc_valid_tm(),
so just remove it.

Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
---
 drivers/rtc/class.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index 74a943e..c29ba7e 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -117,10 +117,6 @@ static int rtc_resume(struct device *dev)
 		return 0;
 	}
 
-	if (rtc_valid_tm(&tm) != 0) {
-		pr_debug("%s:  bogus resume time\n", dev_name(&rtc->dev));
-		return 0;
-	}
 	new_rtc.tv_sec = rtc_tm_to_time64(&tm);
 	new_rtc.tv_nsec = 0;
 
-- 
1.9.1



  parent reply	other threads:[~2015-03-09  6:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09  6:27 [PATCH v5 1/4] time: Add needed macros for timekeeping_inject_sleeptime64() Xunlei Pang
2015-03-09  6:27 ` [PATCH v5 2/4] time: Fix a bug in timekeeping_suspend() with no persistent clock Xunlei Pang
2015-03-18 17:17   ` John Stultz
2015-03-09  6:27 ` [PATCH v5 3/4] time: rtc: Don't bother into rtc_resume() for the nonstop clocksource Xunlei Pang
2015-03-09  6:27 ` Xunlei Pang [this message]
2015-03-18 17:26   ` [PATCH v5 4/4] rtc: Remove redundant rtc_valid_tm() from rtc_resume() John Stultz
2015-03-18 17:25 ` [PATCH v5 1/4] time: Add needed macros for timekeeping_inject_sleeptime64() John Stultz

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=1425882471-5591-4-git-send-email-xlpang@126.com \
    --to=xlpang@126.com \
    --cc=a.zummo@towertech.it \
    --cc=arnd.bergmann@linaro.org \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pang.xunlei@linaro.org \
    --cc=peterz@infradead.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.