lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 12 Mar 2020 17:26:34 +0000
From:   Adam Thomson <Adam.Thomson.Opensource@...semi.com>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Support Opensource <Support.Opensource@...semi.com>,
        Alessandro Zummo <a.zummo@...ertech.it>
CC:     "linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 3/3] rtc: da9052: switch to
 rtc_time64_to_tm/rtc_tm_to_time64

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@...tlin.com>

Acked-by: Adam Thomson <Adam.Thomson.Opensource@...semi.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

Powered by blists - more mailing lists