Re: [PATCH v3] rtc: wilco-ec: Handle reading invalid times

2019-10-03 Thread Nick Crews
On Wed, Oct 2, 2019 at 9:20 AM Dmitry Torokhov wrote: > > On Wed, Oct 2, 2019 at 3:32 AM Alexandre Belloni > wrote: > > > > On 01/10/2019 13:42:24-0700, Dmitry Torokhov wrote: > > > On Tue, Oct 1, 2019 at 12:53 PM Alexandre Belloni > > > wrote: > > > > > > > > Hi Nick, > > > > > > > > On 25/09/2

Re: [PATCH v3] rtc: wilco-ec: Handle reading invalid times

2019-10-02 Thread Alexandre Belloni
On 02/10/2019 08:20:34-0700, Dmitry Torokhov wrote: > > I'm still not convinced it is useful to have an error in dmesg when the > > time is invalid, as long as userspace knows it is invalid. What is the > > course of action for the end user when that happens? > > Report it, or, in our case, we wil

Re: [PATCH v3] rtc: wilco-ec: Handle reading invalid times

2019-10-02 Thread Dmitry Torokhov
On Wed, Oct 2, 2019 at 3:32 AM Alexandre Belloni wrote: > > On 01/10/2019 13:42:24-0700, Dmitry Torokhov wrote: > > On Tue, Oct 1, 2019 at 12:53 PM Alexandre Belloni > > wrote: > > > > > > Hi Nick, > > > > > > On 25/09/2019 14:32:09-0600, Nick Crews wrote: > > > > If the RTC HW returns an invalid

Re: [PATCH v3] rtc: wilco-ec: Handle reading invalid times

2019-10-02 Thread Alexandre Belloni
On 01/10/2019 13:42:24-0700, Dmitry Torokhov wrote: > On Tue, Oct 1, 2019 at 12:53 PM Alexandre Belloni > wrote: > > > > Hi Nick, > > > > On 25/09/2019 14:32:09-0600, Nick Crews wrote: > > > If the RTC HW returns an invalid time, the rtc_year_days() > > > call would crash. This patch adds error lo

Re: [PATCH v3] rtc: wilco-ec: Handle reading invalid times

2019-10-01 Thread Dmitry Torokhov
On Tue, Oct 1, 2019 at 12:53 PM Alexandre Belloni wrote: > > Hi Nick, > > On 25/09/2019 14:32:09-0600, Nick Crews wrote: > > If the RTC HW returns an invalid time, the rtc_year_days() > > call would crash. This patch adds error logging in this > > situation, and removes the tm_yday and tm_wday cal

Re: [PATCH v3] rtc: wilco-ec: Handle reading invalid times

2019-10-01 Thread Alexandre Belloni
Hi Nick, On 25/09/2019 14:32:09-0600, Nick Crews wrote: > If the RTC HW returns an invalid time, the rtc_year_days() > call would crash. This patch adds error logging in this > situation, and removes the tm_yday and tm_wday calculations. > These fields should not be relied upon by userspace > acco

Re: [PATCH v3] rtc: wilco-ec: Handle reading invalid times

2019-09-25 Thread Dmitry Torokhov
On Wed, Sep 25, 2019 at 1:32 PM Nick Crews wrote: > > If the RTC HW returns an invalid time, the rtc_year_days() > call would crash. This patch adds error logging in this > situation, and removes the tm_yday and tm_wday calculations. > These fields should not be relied upon by userspace > accordin

[PATCH v3] rtc: wilco-ec: Handle reading invalid times

2019-09-25 Thread Nick Crews
If the RTC HW returns an invalid time, the rtc_year_days() call would crash. This patch adds error logging in this situation, and removes the tm_yday and tm_wday calculations. These fields should not be relied upon by userspace according to man rtc, and thus we don't need to calculate them. Signed