Re: [PATCH 1/2] clockevents: introduce ->set_dev_mode() which can return error

2015-01-25 Thread Thomas Gleixner
> > case CLOCK_EVT_MODE_RESUME: > > return dev->setup_resume(dev); > > Because setting to all these existing modes isn't allowed > to fail currently, shouldn't we make return type of all the new > callbacks as 'void' and return 0 from this routine ? That way, these >

Re: [PATCH 1/2] clockevents: introduce ->set_dev_mode() which can return error

2015-01-25 Thread Viresh Kumar
Hi Thomas, On 23 January 2015 at 17:27, Thomas Gleixner wrote: > static int __clockevents_set_mode(dev, mode) > { > /* Transition mode */ > if (dev->set_mode) { >if (mode > CLOCK_EVT_MODE_RESUME) > return -ENOSYS; >dev->set_mode(mode,

Re: [PATCH 1/2] clockevents: introduce -set_dev_mode() which can return error

2015-01-25 Thread Thomas Gleixner
case CLOCK_EVT_MODE_RESUME: return dev-setup_resume(dev); Because setting to all these existing modes isn't allowed to fail currently, shouldn't we make return type of all the new callbacks as 'void' and return 0 from this routine ? That way, these callbacks would

Re: [PATCH 1/2] clockevents: introduce -set_dev_mode() which can return error

2015-01-25 Thread Viresh Kumar
Hi Thomas, On 23 January 2015 at 17:27, Thomas Gleixner t...@linutronix.de wrote: static int __clockevents_set_mode(dev, mode) { /* Transition mode */ if (dev-set_mode) { if (mode CLOCK_EVT_MODE_RESUME) return -ENOSYS;

Re: [PATCH 1/2] clockevents: introduce ->set_dev_mode() which can return error

2015-01-23 Thread Thomas Gleixner
On Tue, 9 Dec 2014, Kevin Hilman wrote: > diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c > index 55449909f114..f7614041240e 100644 > --- a/kernel/time/clockevents.c > +++ b/kernel/time/clockevents.c > @@ -105,7 +105,16 @@ void clockevents_set_mode(struct clock_event_device

Re: [PATCH 1/2] clockevents: introduce -set_dev_mode() which can return error

2015-01-23 Thread Thomas Gleixner
On Tue, 9 Dec 2014, Kevin Hilman wrote: diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 55449909f114..f7614041240e 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -105,7 +105,16 @@ void clockevents_set_mode(struct clock_event_device *dev,

Re: [PATCH 1/2] clockevents: introduce ->set_dev_mode() which can return error

2014-12-09 Thread Preeti U Murthy
On 12/10/2014 03:33 AM, Kevin Hilman wrote: > From: Viresh Kumar > > Currently, the ->set_mode() method of a clockevent device is not > allowed to fail, so it has no return value. In order to add new > clockevent modes, and allow the setting of those modes to fail, we > need the clockevent core

[PATCH 1/2] clockevents: introduce ->set_dev_mode() which can return error

2014-12-09 Thread Kevin Hilman
From: Viresh Kumar Currently, the ->set_mode() method of a clockevent device is not allowed to fail, so it has no return value. In order to add new clockevent modes, and allow the setting of those modes to fail, we need the clockevent core to be able to detect when setting a mode fails. To

[PATCH 1/2] clockevents: introduce -set_dev_mode() which can return error

2014-12-09 Thread Kevin Hilman
From: Viresh Kumar viresh.ku...@linaro.org Currently, the -set_mode() method of a clockevent device is not allowed to fail, so it has no return value. In order to add new clockevent modes, and allow the setting of those modes to fail, we need the clockevent core to be able to detect when setting

Re: [PATCH 1/2] clockevents: introduce -set_dev_mode() which can return error

2014-12-09 Thread Preeti U Murthy
On 12/10/2014 03:33 AM, Kevin Hilman wrote: From: Viresh Kumar viresh.ku...@linaro.org Currently, the -set_mode() method of a clockevent device is not allowed to fail, so it has no return value. In order to add new clockevent modes, and allow the setting of those modes to fail, we need the

Re: [PATCH 1/2] clockevents: introduce ->set_dev_mode() which can return error

2014-11-19 Thread Preeti U Murthy
This looks good to me. On 11/20/2014 12:09 AM, Kevin Hilman wrote: > From: Viresh Kumar > > Currently, the ->set_mode() method of a clockevent device is not > allowed to fail, so it has no return value. In order to add new > clockevent modes, and allow the setting of those modes to fail, we >

[PATCH 1/2] clockevents: introduce ->set_dev_mode() which can return error

2014-11-19 Thread Kevin Hilman
From: Viresh Kumar Currently, the ->set_mode() method of a clockevent device is not allowed to fail, so it has no return value. In order to add new clockevent modes, and allow the setting of those modes to fail, we need the clockevent core to be able to detect when setting a mode fails. To

[PATCH 1/2] clockevents: introduce -set_dev_mode() which can return error

2014-11-19 Thread Kevin Hilman
From: Viresh Kumar viresh.ku...@linaro.org Currently, the -set_mode() method of a clockevent device is not allowed to fail, so it has no return value. In order to add new clockevent modes, and allow the setting of those modes to fail, we need the clockevent core to be able to detect when setting

Re: [PATCH 1/2] clockevents: introduce -set_dev_mode() which can return error

2014-11-19 Thread Preeti U Murthy
This looks good to me. On 11/20/2014 12:09 AM, Kevin Hilman wrote: From: Viresh Kumar viresh.ku...@linaro.org Currently, the -set_mode() method of a clockevent device is not allowed to fail, so it has no return value. In order to add new clockevent modes, and allow the setting of those

[PATCH 1/2] clockevents: introduce ->set_dev_mode() which can return error

2014-07-03 Thread Kevin Hilman
From: Viresh Kumar Currently, the ->set_mode() method of a clockevent device is not allowed to fail, so it has no return value. In order to add new clockevent modes, and allow the setting of those modes to fail, we need the clockevent core to be able to detect when setting a mode fails. To

[PATCH 1/2] clockevents: introduce -set_dev_mode() which can return error

2014-07-03 Thread Kevin Hilman
From: Viresh Kumar viresh.ku...@linaro.org Currently, the -set_mode() method of a clockevent device is not allowed to fail, so it has no return value. In order to add new clockevent modes, and allow the setting of those modes to fail, we need the clockevent core to be able to detect when setting