From patchwork Thu Jan 22 12:01:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "pang.xunlei" X-Patchwork-Id: 43516 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1C3D9218DB for ; Thu, 22 Jan 2015 12:02:51 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf794533lbd.3 for ; Thu, 22 Jan 2015 04:02:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=5eCG5R3h0MEsSFNEPHAuLLMwVE+HlmZLmY8NLepRlgo=; b=I6VunwvWJkWptqTMV6U5ygzocS4IbWt0ciKOUuBM+Wlc7b7+U1sPis79lT/n+P6kw0 3fhyvgacTyLIVM4pN+5S2PvVm18rDsqEPJi4qe327muGGq42sTXc1nLY9Oew+A7BnWBE Jr/Gq1Q2mWPsB6JTkbDFuLVLjUvMTKu6tf+Kkyfn1PutkS7Dsyd7l2/l2QlyWyl8tK6u x3EuBxGXDpZn3oThMbjwN0HqmSIYFlpBBy4cf8Ykhwt4sLsleFXFve8y6t543vcFjFV/ vBdie8DUJ4RwakHfUdkUXa8Ii2p68qQ7y42wpIp9S8gMVGFD1orUV8tQYUAQWjuccHCZ yfKw== X-Gm-Message-State: ALoCoQkh4ZfSXijCNFJId5/TMmTFcBYNn64FbR+AjbWDxSkdE4gK7xvYE7IWMiBjdyGF+IR5aPBw X-Received: by 10.152.182.204 with SMTP id eg12mr926lac.10.1421928170070; Thu, 22 Jan 2015 04:02:50 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.220.164 with SMTP id px4ls149713lac.34.gmail; Thu, 22 Jan 2015 04:02:49 -0800 (PST) X-Received: by 10.152.206.41 with SMTP id ll9mr1139978lac.62.1421928169827; Thu, 22 Jan 2015 04:02:49 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id y9si20588782lbr.7.2015.01.22.04.02.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 04:02:49 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id z11so1116881lbi.6 for ; Thu, 22 Jan 2015 04:02:49 -0800 (PST) X-Received: by 10.152.27.8 with SMTP id p8mr1059929lag.69.1421928169658; Thu, 22 Jan 2015 04:02:49 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp237789lbb; Thu, 22 Jan 2015 04:02:48 -0800 (PST) X-Received: by 10.70.36.111 with SMTP id p15mr1606534pdj.122.1421928167256; Thu, 22 Jan 2015 04:02:47 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pt2si11736385pbb.199.2015.01.22.04.02.46; Thu, 22 Jan 2015 04:02:47 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752481AbbAVMCn (ORCPT + 28 others); Thu, 22 Jan 2015 07:02:43 -0500 Received: from mail-qa0-f46.google.com ([209.85.216.46]:40635 "EHLO mail-qa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854AbbAVMC0 (ORCPT ); Thu, 22 Jan 2015 07:02:26 -0500 Received: by mail-qa0-f46.google.com with SMTP id j7so753222qaq.5 for ; Thu, 22 Jan 2015 04:02:25 -0800 (PST) X-Received: by 10.140.82.136 with SMTP id h8mr1530329qgd.75.1421928145469; Thu, 22 Jan 2015 04:02:25 -0800 (PST) Received: from ip-10-181-65-231.ec2.internal ([54.235.93.228]) by mx.google.com with ESMTPSA id j6sm3012956qga.9.2015.01.22.04.02.24 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Jan 2015 04:02:24 -0800 (PST) From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: rtc-linux@googlegroups.com, Thomas Gleixner , Alessandro Zummo , John Stultz , Arnd Bergmann , Xunlei Pang Subject: [PATCH v2 2/3] rtc: Remove redundant rtc_valid_tm() from rtc_resume() Date: Thu, 22 Jan 2015 12:01:16 +0000 Message-Id: <1421928077-4698-2-git-send-email-pang.xunlei@linaro.org> X-Mailer: git-send-email 2.2.1 In-Reply-To: <1421928077-4698-1-git-send-email-pang.xunlei@linaro.org> References: <1421928077-4698-1-git-send-email-pang.xunlei@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pang.xunlei@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , rtc_read_time() has already judged valid tm by rtc_valid_tm(), so just remove it. Signed-off-by: Xunlei Pang --- drivers/rtc/class.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 6100af5..7db4c90 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;