From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout2.samsung.com (mailout2.samsung.com. [203.254.224.25]) by gmr-mx.google.com with ESMTPS id br7si765912pdb.2.2015.04.02.16.44.47 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 02 Apr 2015 16:44:47 -0700 (PDT) Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NM700GP6DYLP630@mailout2.samsung.com> for rtc-linux@googlegroups.com; Fri, 03 Apr 2015 08:44:45 +0900 (KST) Message-id: <551DD46C.6030207@samsung.com> Date: Fri, 03 Apr 2015 08:44:44 +0900 From: Chanwoo Choi MIME-version: 1.0 To: Krzysztof Kozlowski Cc: Alexandre Belloni , linux-samsung-soc@vger.kernel.org, Alessandro Zummo , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, Marek Szyprowski Subject: [rtc-linux] Re: [PATCH] rtc: rtc-s3c: Remove one superfluous rtc_valid_tm() check References: <1427985116-20314-1-git-send-email-k.kozlowski@samsung.com> In-reply-to: <1427985116-20314-1-git-send-email-k.kozlowski@samsung.com> Content-type: text/plain; charset=UTF-8 Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , On 04/02/2015 11:31 PM, Krzysztof Kozlowski wrote: > The s3c_rtc_gettime() returns already result of rtc_valid_tm() on > obtained time so get rid of another call to rtc_valid_tm(). > > Signed-off-by: Krzysztof Kozlowski > --- > drivers/rtc/rtc-s3c.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c > index 1d3a4c58fec4..a0f832362199 100644 > --- a/drivers/rtc/rtc-s3c.c > +++ b/drivers/rtc/rtc-s3c.c > @@ -497,9 +497,7 @@ static int s3c_rtc_probe(struct platform_device *pdev) > device_init_wakeup(&pdev->dev, 1); > > /* Check RTC Time */ > - s3c_rtc_gettime(&pdev->dev, &rtc_tm); > - > - if (rtc_valid_tm(&rtc_tm)) { > + if (s3c_rtc_gettime(&pdev->dev, &rtc_tm)) { > rtc_tm.tm_year = 100; > rtc_tm.tm_mon = 0; > rtc_tm.tm_mday = 1; > s3c_rtc_gettime() return the value of rtc_valid_tm(). Looks good to me. Reviewed-by: Chanwoo Choi Thanks, Chanwoo Choi -- -- 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. --- 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 email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chanwoo Choi Subject: Re: [PATCH] rtc: rtc-s3c: Remove one superfluous rtc_valid_tm() check Date: Fri, 03 Apr 2015 08:44:44 +0900 Message-ID: <551DD46C.6030207@samsung.com> References: <1427985116-20314-1-git-send-email-k.kozlowski@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailout2.samsung.com ([203.254.224.25]:12674 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750895AbbDBXor (ORCPT ); Thu, 2 Apr 2015 19:44:47 -0400 In-reply-to: <1427985116-20314-1-git-send-email-k.kozlowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org To: Krzysztof Kozlowski Cc: Alexandre Belloni , linux-samsung-soc@vger.kernel.org, Alessandro Zummo , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, Marek Szyprowski On 04/02/2015 11:31 PM, Krzysztof Kozlowski wrote: > The s3c_rtc_gettime() returns already result of rtc_valid_tm() on > obtained time so get rid of another call to rtc_valid_tm(). > > Signed-off-by: Krzysztof Kozlowski > --- > drivers/rtc/rtc-s3c.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c > index 1d3a4c58fec4..a0f832362199 100644 > --- a/drivers/rtc/rtc-s3c.c > +++ b/drivers/rtc/rtc-s3c.c > @@ -497,9 +497,7 @@ static int s3c_rtc_probe(struct platform_device *pdev) > device_init_wakeup(&pdev->dev, 1); > > /* Check RTC Time */ > - s3c_rtc_gettime(&pdev->dev, &rtc_tm); > - > - if (rtc_valid_tm(&rtc_tm)) { > + if (s3c_rtc_gettime(&pdev->dev, &rtc_tm)) { > rtc_tm.tm_year = 100; > rtc_tm.tm_mon = 0; > rtc_tm.tm_mday = 1; > s3c_rtc_gettime() return the value of rtc_valid_tm(). Looks good to me. Reviewed-by: Chanwoo Choi Thanks, Chanwoo Choi