On 26 May 2014 12:57, Preeti U Murthy preeti@linux.vnet.ibm.com wrote:
I would suggest add a WARN_ON() on failure and fall through.
Okay, lets do a voting here :)
@Frederic/Kevin/Daniel: What do you guys think ?
In the first case of clockevents_set_mode() we are unsure of the mode we are setting.
True.
There can be more modes added, going forward and we cannot special case each for a failed return.
True, but we will do WARN_ON() only for modes like PERIODIC which can't fail. Isn't it ?
In the second case of update_freq() you *know* you are setting PERIODIC_MODE which is rest assured will not fail.
Yeah, and WARN_ON() assures us that it doesn't fail. :)