On 13 May 2014 15:51, Preeti U Murthy preeti@linux.vnet.ibm.com wrote:
On 05/13/2014 02:34 PM, Viresh Kumar wrote:
There is a requirement to add another mode: CLOCK_EVT_MODE_ONESHOT_STOPPED (lkml.org/lkml/2014/5/9/508) to clockevent devices and clockevent-drivers may or maynot support it. And so can return failure codes on a call to ->set_mode(), which has a return type of 'void' as of now.
To fix that, add another callback ->set_dev_mode(), with return type 'int'. All clockevent drivers will be migrated to use this new interface later. Also mark ->set_mode() deprecated.
In order to propagate error codes to callers of clockevents_set_mode(), its return type is also changed to 'int', but all the error handling is done inside clockevents_set_mode() currently as none of the currently available modes are allowed to fail.
Instead of *all the error handling*, you can perhaps say that we have added a WARN_ON() to begin with.
Sure..
We are ideally not doing any error handling other than a WARN_ON() right?
Yep, we are just returning the error in that case..
Reviewed-by: Preeti U Murthy preeti@linux.vnet.ibm.com
Thanks :)