From: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Support Opensource <Support.Opensource@diasemi.com>,
Alessandro Zummo <a.zummo@towertech.it>
Cc: "linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 3/3] rtc: da9052: switch to rtc_time64_to_tm/rtc_tm_to_time64
Date: Thu, 12 Mar 2020 17:26:34 +0000 [thread overview]
Message-ID: <AM6PR10MB2263BC940E01C0B800C5A7F580FD0@AM6PR10MB2263.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20200306073548.57579-3-alexandre.belloni@bootlin.com>
On 06 March 2020 07:36, Alexandre Belloni wrote:
> Call the 64bit versions of rtc_tm time conversion.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> ---
> drivers/rtc/rtc-da9052.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c
> index 27cde834a1b8..1c567f86ee30 100644
> --- a/drivers/rtc/rtc-da9052.c
> +++ b/drivers/rtc/rtc-da9052.c
> @@ -103,13 +103,11 @@ static int da9052_set_alarm(struct da9052_rtc *rtc,
> struct rtc_time *rtc_tm)
> int ret;
> uint8_t v[3];
>
> - ret = rtc_tm_to_time(rtc_tm, &alm_time);
> - if (ret != 0)
> - return ret;
> + alm_time = rtc_tm_to_time64(rtc_tm);
>
> if (rtc_tm->tm_sec > 0) {
> alm_time += 60 - rtc_tm->tm_sec;
> - rtc_time_to_tm(alm_time, rtc_tm);
> + rtc_time64_to_tm(alm_time, rtc_tm);
> }
> BUG_ON(rtc_tm->tm_sec); /* it will cause repeated irqs if not zero */
>
> --
> 2.24.1
next prev parent reply other threads:[~2020-03-12 17:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 7:35 [PATCH 1/3] rtc: da9052: convert to devm_rtc_allocate_device Alexandre Belloni
2020-03-06 7:35 ` [PATCH 2/3] rtc: da9052: set range Alexandre Belloni
2020-03-12 17:16 ` Adam Thomson
2020-03-06 7:35 ` [PATCH 3/3] rtc: da9052: switch to rtc_time64_to_tm/rtc_tm_to_time64 Alexandre Belloni
2020-03-12 17:26 ` Adam Thomson [this message]
2020-03-12 17:11 ` [PATCH 1/3] rtc: da9052: convert to devm_rtc_allocate_device Adam Thomson
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=AM6PR10MB2263BC940E01C0B800C5A7F580FD0@AM6PR10MB2263.EURPRD10.PROD.OUTLOOK.COM \
--to=adam.thomson.opensource@diasemi.com \
--cc=Support.Opensource@diasemi.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.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).