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, 9 Nov 2017 09:53:01 +0800
From:   Baolin Wang <baolin.wang@...aro.org>
To:     Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Cc:     Baolin Wang <baolin.wang@...eadtrum.com>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        devicetree@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        linux-rtc@...r.kernel.org, Mark Brown <broonie@...nel.org>
Subject: Re: [PATCH v2 2/2] rtc: sprd: Add Spreadtrum RTC driver

Hi Alexandre,

On 9 November 2017 at 09:26, Alexandre Belloni
<alexandre.belloni@...e-electrons.com> wrote:
> Hi,
>
> On 08/11/2017 at 17:16:15 +0800, Baolin Wang wrote:
>> +static int sprd_rtc_read_time(struct device *dev, struct rtc_time *tm)
>> +{
>> +     struct sprd_rtc *rtc = dev_get_drvdata(dev);
>> +     time64_t secs;
>> +     int ret;
>> +
>
> I would have expected a check for SPRD_RTC_POWER_RESET_FLAG here.

Actually I want to create one separate patch to add this feature. But
like you suggested, I can add this checking in here in next version.
Thanks for your suggestion.

>
>
>> +     ret = sprd_rtc_get_secs(rtc, SPRD_RTC_TIME, &secs);
>> +     if (ret)
>> +             return ret;
>> +
>> +     rtc_time64_to_tm(secs, tm);
>> +     return rtc_valid_tm(tm);
>> +}
>> +
>> +static int sprd_rtc_set_time(struct device *dev, struct rtc_time *tm)
>> +{
>> +     struct sprd_rtc *rtc = dev_get_drvdata(dev);
>> +     time64_t secs = rtc_tm_to_time64(tm);
>> +
>
> And you need to reset SPRD_RTC_POWER_RESET_FLAG here
>
>> +     return sprd_rtc_set_secs(rtc, SPRD_RTC_TIME, secs);
>> +}
>> +

-- 
Baolin.wang
Best Regards

Powered by blists - more mailing lists