From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752255AbcGUKrV (ORCPT ); Thu, 21 Jul 2016 06:47:21 -0400 Received: from authsmtp74.register.it ([195.110.101.58]:62863 "EHLO authsmtp.register.it" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751687AbcGUKrK (ORCPT ); Thu, 21 Jul 2016 06:47:10 -0400 X-Rid: benoit@wsystem.com@90.105.184.123 From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= To: rtc-linux@googlegroups.com Cc: linux-kernel@vger.kernel.org, Alessandro Zummo , Alexandre Belloni , =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Subject: [PATCH 2/6] rtc: rv8803: Remove the check for valid time Date: Thu, 21 Jul 2016 12:41:28 +0200 Message-Id: <1469097692-103146-2-git-send-email-benoit@wsystem.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1469097692-103146-1-git-send-email-benoit@wsystem.com> References: <1469097692-103146-1-git-send-email-benoit@wsystem.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The RTC core always calls rtc_valid_tm() after ->read_time() in case of success (in __rtc_read_time()), so do not call it twice. Signed-off-by: Benoît Thébaudeau --- drivers/rtc/rtc-rv8803.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c index 05c79c3..e740c83 100644 --- a/drivers/rtc/rtc-rv8803.c +++ b/drivers/rtc/rtc-rv8803.c @@ -150,7 +150,7 @@ static int rv8803_get_time(struct device *dev, struct rtc_time *tm) tm->tm_mon = bcd2bin(date[RV8803_MONTH] & 0x1f) - 1; tm->tm_year = bcd2bin(date[RV8803_YEAR]) + 100; - return rtc_valid_tm(tm); + return 0; } static int rv8803_set_time(struct device *dev, struct rtc_time *tm) -- 2.5.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: rtc-linux@googlegroups.com Received: from authsmtp.register.it (authsmtp91.register.it. [195.110.122.176]) by gmr-mx.google.com with ESMTPS id i198si139430wmd.2.2016.07.21.03.42.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 21 Jul 2016 03:42:02 -0700 (PDT) From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= To: rtc-linux@googlegroups.com Cc: linux-kernel@vger.kernel.org, Alessandro Zummo , Alexandre Belloni , =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Subject: [rtc-linux] [PATCH 2/6] rtc: rv8803: Remove the check for valid time Date: Thu, 21 Jul 2016 12:41:28 +0200 Message-Id: <1469097692-103146-2-git-send-email-benoit@wsystem.com> In-Reply-To: <1469097692-103146-1-git-send-email-benoit@wsystem.com> References: <1469097692-103146-1-git-send-email-benoit@wsystem.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , The RTC core always calls rtc_valid_tm() after ->read_time() in case of success (in __rtc_read_time()), so do not call it twice. Signed-off-by: Beno=C3=AEt Th=C3=A9baudeau --- drivers/rtc/rtc-rv8803.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c index 05c79c3..e740c83 100644 --- a/drivers/rtc/rtc-rv8803.c +++ b/drivers/rtc/rtc-rv8803.c @@ -150,7 +150,7 @@ static int rv8803_get_time(struct device *dev, struct r= tc_time *tm) tm->tm_mon =3D bcd2bin(date[RV8803_MONTH] & 0x1f) - 1; tm->tm_year =3D bcd2bin(date[RV8803_YEAR]) + 100; =20 - return rtc_valid_tm(tm); + return 0; } =20 static int rv8803_set_time(struct device *dev, struct rtc_time *tm) --=20 2.5.0 --=20 You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. ---=20 You received this message because you are subscribed to the Google Groups "= rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.