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  linux-cve-announce  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]
Message-ID: <20200402135731.GA625345@aptenodytes>
Date:   Thu, 2 Apr 2020 15:57:31 +0200
From:   Paul Kocialkowski <paul.kocialkowski@...tlin.com>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc:     Alessandro Zummo <a.zummo@...ertech.it>,
        Maxime Ripard <mripard@...nel.org>,
        Chen-Yu Tsai <wens@...e.org>, linux-rtc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 2/2] rtc: sun6i: switch to
 rtc_time64_to_tm/rtc_tm_to_time64

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

This was successfully:
Tested-by: Paul Kocialkowski <paul.kocialkowski@...tlin.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@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ