[PATCH] driver/rtc/class.c: check the error after rtc_read_time()

2014-07-15 Thread Hyogi Gim
In rtc_suspend() and rtc_resume(), the error after rtc_read_time() is not checked. If rtc device fail to read time, we cannot guarantee the following process. Add the verification code for returned rtc_read_time() error. Signed-off-by: Hyogi Gim --- drivers/rtc/class.c | 16 ++-- 1

[PATCH] alarmtimer: Add the verification code for rtc device error.

2014-07-10 Thread Hyogi Gim
ot;return 0" to clarify the rtc device error. Signed-off-by: Hyogi Gim --- kernel/time/alarmtimer.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index 88c9c65..8cc43b8 100644 --- a/kernel/time/alarmtimer

[PATCH] drivers/rtc/interface.c: check the error after __rtc_read_time()

2014-07-03 Thread Hyogi Gim
In __rtc_set_alarm(), the error after __rtc_read_time() is not checked. If rtc device fail to read time, we cannot guarantee the following process. Add the verification code for returned __rtc_read_time() error. Signed-off-by: Hyogi Gim --- drivers/rtc/interface.c | 2 ++ 1 file changed, 2

[PATCH] alarmtimers: verify the alarmtimer_type value from clock2alarm()

2014-07-08 Thread Hyogi Gim
returned alarmtimer_type from clock2alarm(). Signed-off-by: Hyogi Gim Cc: Thomas Gleixner --- kernel/time/alarmtimer.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index 88c9c65..0b117c6

Re: [PATCH] driver/rtc/class.c: check the error after rtc_read_time()

2014-08-06 Thread Hyogi Gim
On 07/24/2014 09:19 AM, Andrew Morton wrote: > > So what should rtc do in this case? At present it pretends the read > succeeded. Either way, this doesn't seem to be the place to be making > such policy decisions.. > > > I agree. But, in this case, RTC device driver can not do anything. An

Re: [PATCH] alarmtimer: Add the verification code for rtc device error.

2014-08-06 Thread Hyogi Gim
On 07/31/2014 02:58 AM, John Stultz wrote: > > Hey! Sorry for the late response here. > > So this seems reasonable as always failing suspend is problematic, but > I worry that for the case where we do have a failure to read or set > the RTC, we'd suspend and not wake up as specified, which is a

[PATCH] drivers/rtc/interface.c: check the validation of rtc_time in __rtc_read_time

2014-10-07 Thread Hyogi Gim
Some of rtc devices always return '0' when rtc_class_ops.read_time is called. So if rtc_time isn't verified in callback, rtc interface cannot know whether rtc_time is valid. Check rtc_time by using 'rtc_valid_tm' in '__rtc_read_time'. And add the message for d

Re: [PATCH] drivers/rtc/interface.c: check the validation of rtc_time in __rtc_read_time

2014-11-20 Thread Hyogi Gim
On Tue, Oct 14, 2014 at 03:21:31PM -0700, Andrew Morton wrote: > On Wed, 8 Oct 2014 11:05:29 +0900 Hyogi Gim wrote: > > > Some of rtc devices always return '0' when rtc_class_ops.read_time is > > called. > > So if rtc_time isn't verified in call

Re: [PATCH] drivers/rtc/interface.c: check the error after __rtc_read_time()

2014-12-21 Thread Hyogi Gim
On Wed, Dec 17, 2014 at 01:51:50PM -0800, Andrew Morton wrote: > On Wed, 17 Dec 2014 12:15:24 +0900 Hyogi Gim wrote: > > > Add the verification code for returned __rtc_read_time() error in > > rtc_update_irq_enable() and rtc_timer_do_work(). > > > > ... > L

[PATCH] drivers/rtc/interface.c: check the error after __rtc_read_time()

2014-12-16 Thread Hyogi Gim
Add the verification code for returned __rtc_read_time() error in rtc_update_irq_enable() and rtc_timer_do_work(). Signed-off-by: Hyogi Gim --- drivers/rtc/interface.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/interface.c b/drivers/rtc