linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] rtc: sun6i: switch to rtc_time64_to_tm/rtc_tm_to_time64
Date: Thu, 2 Apr 2020 15:57:31 +0200	[thread overview]
Message-ID: <20200402135731.GA625345@aptenodytes> (raw)
In-Reply-To: <20200330201510.861217-3-alexandre.belloni@bootlin.com>

[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]

Hi,

On Mon 30 Mar 20, 22:15, Alexandre Belloni wrote:
> Call the 64bit versions of rtc_tm time conversion.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

This was successfully:
Tested-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>

Cheers,

Paul

> ---
>  drivers/rtc/rtc-sun6i.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c
> index 446ce38c1592..e2b8b150bcb4 100644
> --- a/drivers/rtc/rtc-sun6i.c
> +++ b/drivers/rtc/rtc-sun6i.c
> @@ -498,7 +498,7 @@ static int sun6i_rtc_getalarm(struct device *dev, struct rtc_wkalrm *wkalrm)
>  
>  	wkalrm->enabled = !!(alrm_en & SUN6I_ALRM_EN_CNT_EN);
>  	wkalrm->pending = !!(alrm_st & SUN6I_ALRM_EN_CNT_EN);
> -	rtc_time_to_tm(chip->alarm, &wkalrm->time);
> +	rtc_time64_to_tm(chip->alarm, &wkalrm->time);
>  
>  	return 0;
>  }
> @@ -519,8 +519,8 @@ static int sun6i_rtc_setalarm(struct device *dev, struct rtc_wkalrm *wkalrm)
>  		return -EINVAL;
>  	}
>  
> -	rtc_tm_to_time(alrm_tm, &time_set);
> -	rtc_tm_to_time(&tm_now, &time_now);
> +	time_set = rtc_tm_to_time64(alrm_tm);
> +	time_now = rtc_tm_to_time64(&tm_now);
>  	if (time_set <= time_now) {
>  		dev_err(dev, "Date to set in the past\n");
>  		return -EINVAL;
> -- 
> 2.25.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-04-02 13:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 20:15 [PATCH] rtc: remove rtc_time_to_tm and rtc_tm_to_time Alexandre Belloni
2020-03-30 20:15 ` [PATCH 1/2] rtc: sun6i: let the core handle rtc range Alexandre Belloni
2020-03-30 20:19   ` Alexandre Belloni
2020-03-30 20:15 ` [PATCH 2/2] rtc: sun6i: switch to rtc_time64_to_tm/rtc_tm_to_time64 Alexandre Belloni
2020-04-02 13:57   ` Paul Kocialkowski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-03-30 20:12 [PATCH 1/2] rtc: sun6i: let the core handle rtc range Alexandre Belloni
2020-03-30 20:12 ` [PATCH 2/2] rtc: sun6i: switch to rtc_time64_to_tm/rtc_tm_to_time64 Alexandre Belloni

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=20200402135731.GA625345@aptenodytes \
    --to=paul.kocialkowski@bootlin.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=wens@csie.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).