RE: Re: [PATCH] usb: chipidea: use better pattern with WARN_ON()

2016-12-07 Thread Atul Raj
On 7 Dec 2016 18:56, "Greg KH" <gre...@linuxfoundation.org> wrote: > > On Wed, Dec 07, 2016 at 05:46:09PM +0530, Atul Raj wrote: > > Instead of using: > > if (cond) { > >WARN_ON(1); > >do_stuff(); > > } > > >

[PATCH] usb: chipidea: use better pattern with WARN_ON()

2016-12-07 Thread Atul Raj
Instead of using: if (cond) { WARN_ON(1); do_stuff(); } Use a better pattern with WARN_ON() placed in if condition: if (WARN_ON(cond)) do_stuff(); Signed-off-by: Atul Raj <atu...@samsung.com> --- drivers/usb/chipidea/ci_hdrc_imx.c | 8 ++-- 1 file changed, 2 insertions

[PATCH] usb: chipidea: use better pattern with WARN_ON()

2016-12-07 Thread Atul Raj
Instead of using: if (cond) { WARN_ON(1); do_stuff(); } Use a better pattern with WARN_ON() placed in if condition: if (WARN_ON(cond)) do_stuff(); Signed-off-by: Atul Raj <atu...@samsung.com> --- drivers/usb/chipidea/core.c | 8 ++-- 1 file changed, 2 insertions(+), 6 del

RE: RE: [PATCH] usb: chipidea: use better pattern with WARN_ON()

2016-12-02 Thread Atul Raj
On 2 Dec 2016 2:18 p.m., "Atul Raj" <atu...@samsung.com> wrote: > > > > >Instead of using: > >if (cond) { > > WARN_ON(1); > > do_stuff(); > >} > > > >Use a better pattern with WARN_ON() placed in if condition:

RE: RE: [PATCH] usb: chipidea: use better pattern with WARN_ON()

2016-12-02 Thread Atul Raj
On 2 Dec 2016 2:17 p.m., "Atul Raj" <atu...@samsung.com> wrote: > > > > > >Instead of using: > >if (cond) { > > WARN_ON(1); > > do_stuff(); > >} > > > >Use a better pattern with WARN_ON() placed in if conditi

[PATCH] usb: hub: no error logs in case of enomem

2016-11-30 Thread Atul Raj
All kmalloc-based functions print enough information on failures. Signed-off-by: Atul Raj <atu...@samsung.com> --- drivers/usb/core/hub.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index cbb1467..82059f26 100644 --- a/drivers/usb/core