Re: [RFC][PATCH 1/4 v3] usb: host: ehci-platform: BUG_ON() to WARN_ON() on probe

2012-08-06 Thread Simon Horman
On Sun, Aug 05, 2012 at 06:51:34PM -0700, kuninori.morimoto...@renesas.com wrote: We should avoid using BUG_ON() in drivers. This patch switch to use WARN_ON() from BUG_ON(), and avoid NULL pointer access by new macro. Signed-off-by: Kuninori Morimoto kuninori.morimoto...@renesas.com ---

Re: [RFC][PATCH 1/4 v3] usb: host: ehci-platform: BUG_ON() to WARN_ON() on probe

2012-08-06 Thread Kuninori Morimoto
Hi Simon Thank you for checking patch +#define ehci_pdata_get(pdata, x) ((pdata) ? (pdata)-x : 0) + FWIW, I think that an inline function would be a slight improvement over a macro here. Likewise for the 2nd patch of this series. All these patches have this kind of macros. I needs

Re: [RFC][PATCH 1/4 v3] usb: host: ehci-platform: BUG_ON() to WARN_ON() on probe

2012-08-06 Thread Alan Stern
On Mon, 6 Aug 2012, Simon Horman wrote: On Sun, Aug 05, 2012 at 06:51:34PM -0700, kuninori.morimoto...@renesas.com wrote: We should avoid using BUG_ON() in drivers. This patch switch to use WARN_ON() from BUG_ON(), and avoid NULL pointer access by new macro. Signed-off-by: Kuninori