Re: [PATCH] rtc: cmos: initialize rtc time when reading alarm

2020-08-14 Thread Victor Ding
Hi Alexandre, On Fri, Aug 14, 2020 at 6:15 PM Alexandre Belloni wrote: > > On 14/08/2020 16:10:13+1000, Victor Ding wrote: > > Hi Alexandre, > > > > On Thu, Aug 13, 2020 at 5:33 PM Alexandre Belloni > > wrote: > > > > > > Hi, > > > > > > On 13/08/2020 15:41:34+1000, Victor Ding wrote: > > > > cm

Re: [PATCH] rtc: cmos: initialize rtc time when reading alarm

2020-08-14 Thread Alexandre Belloni
On 14/08/2020 16:10:13+1000, Victor Ding wrote: > Hi Alexandre, > > On Thu, Aug 13, 2020 at 5:33 PM Alexandre Belloni > wrote: > > > > Hi, > > > > On 13/08/2020 15:41:34+1000, Victor Ding wrote: > > > cmos_read_alarm() may leave certain fields of a struct rtc_time > > > untouched; therefore, thes

Re: [PATCH] rtc: cmos: initialize rtc time when reading alarm

2020-08-13 Thread Victor Ding
Hi Alexandre, On Thu, Aug 13, 2020 at 5:33 PM Alexandre Belloni wrote: > > Hi, > > On 13/08/2020 15:41:34+1000, Victor Ding wrote: > > cmos_read_alarm() may leave certain fields of a struct rtc_time > > untouched; therefore, these fields contain garbage if not properly > > initialized, leading to

Re: [PATCH] rtc: cmos: initialize rtc time when reading alarm

2020-08-13 Thread Alexandre Belloni
Hi, On 13/08/2020 15:41:34+1000, Victor Ding wrote: > cmos_read_alarm() may leave certain fields of a struct rtc_time > untouched; therefore, these fields contain garbage if not properly > initialized, leading to inconsistent values when converting into > time64_t. > This patch to set all fields o

[PATCH] rtc: cmos: initialize rtc time when reading alarm

2020-08-12 Thread Victor Ding
cmos_read_alarm() may leave certain fields of a struct rtc_time untouched; therefore, these fields contain garbage if not properly initialized, leading to inconsistent values when converting into time64_t. This patch to set all fields of a struct rtc_time to -1 before calling cmos_read_alarm(). Si