All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	linux-samsung-soc@vger.kernel.org,
	Alessandro Zummo <a.zummo@towertech.it>,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: [rtc-linux] Re: [PATCH] rtc: rtc-s3c: Remove one superfluous rtc_valid_tm() check
Date: Fri, 03 Apr 2015 08:44:44 +0900	[thread overview]
Message-ID: <551DD46C.6030207@samsung.com> (raw)
In-Reply-To: <1427985116-20314-1-git-send-email-k.kozlowski@samsung.com>

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 <k.kozlowski@samsung.com>
> ---
>  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 <cw00.choi@samsung.com>

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.

WARNING: multiple messages have this Message-ID (diff)
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	linux-samsung-soc@vger.kernel.org,
	Alessandro Zummo <a.zummo@towertech.it>,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH] rtc: rtc-s3c: Remove one superfluous rtc_valid_tm() check
Date: Fri, 03 Apr 2015 08:44:44 +0900	[thread overview]
Message-ID: <551DD46C.6030207@samsung.com> (raw)
In-Reply-To: <1427985116-20314-1-git-send-email-k.kozlowski@samsung.com>

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 <k.kozlowski@samsung.com>
> ---
>  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 <cw00.choi@samsung.com>

Thanks,
Chanwoo Choi

  reply	other threads:[~2015-04-02 23:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 14:31 [rtc-linux] [PATCH] rtc: rtc-s3c: Remove one superfluous rtc_valid_tm() check Krzysztof Kozlowski
2015-04-02 14:31 ` Krzysztof Kozlowski
2015-04-02 23:44 ` Chanwoo Choi [this message]
2015-04-02 23:44   ` Chanwoo Choi

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=551DD46C.6030207@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=rtc-linux@googlegroups.com \
    /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.