lkml.org 
[lkml]   [2018]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 000/100] rtc: remove cargo culted code
Date
On 02 March 2018 08:57, Alexandre Belloni wrote:

> To: Steve Twiss
> Cc: linux-kernel@vger.kernel.org; linux-rtc@vger.kernel.org
> Subject: Re: [PATCH 000/100] rtc: remove cargo culted code
>
> On 02/03/2018 at 08:46:48 +0000, Steve Twiss wrote:
> > Hi Alexandre,
> >
> > Acked for:
> > rtc: da9063: stop validating rtc_time in .read_time
> > rtc: da9052: stop validating rtc_time in .read_time
> > rtc: da9055: stop validating rtc_time in .read_time
> >
> > Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
> >

[...]

> > But after some further looking, I have not got any explicit case of how the
> > time read directly from the DA9063
> > registers can be incorrectly represented. So there should be no need to
> > check this.
>
> My point is that it is checked later in the core anyway so you end up
> doing:
>
> da9063_rtc_read_time()
> return rtc_valid_tm(tm);
>
> __rtc_read_time()
> if (err < 0)
> return err;
> err = rtc_valid_tm(tm);
>
> return err;
>
> So the check in da9063_rtc_read_time is always pointless.

Ahh. I see. Thanks!
Regards,
Steve

\
 
 \ /
  Last update: 2018-03-02 10:09    [W:0.042 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site