On Mon, May 26, 2014 at 10:30:23PM +0530, Viresh Kumar wrote:
On 26-May-2014, at 10:18 pm, Frederic Weisbecker fweisbec@gmail.com wrote:
On Mon, May 26, 2014 at 01:16:10PM +0530, Viresh Kumar wrote:
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 ?
It think as long as it's expected _not_ to fail, it should WARN_ON_ONCE() (really avoid BUG_ON(), it should be used only on stuff like fs where more harm to hardware or data integrity is possible after the error).
Then once you add more modes that might not be supported by hardware, you should add real error handling.
And for now in this patchset, things shouldn't fail, right?
Right.
I mean, I don't want to shortcut what Preeti said. He's right that we should do error handling. But given what Thomas said and the fact that the patchset only does the conversion for now, the error handling can be done when we add a new mode.
Just make sure you told about it in the changelog somewhere, to reduce the amount of frozen sharks.