On Wed, Dec 07, 2016 at 03:00:29PM +, Atul Raj wrote:
> On 7 Dec 2016 18:56, "Greg KH" wrote:
> >
> > On Wed, Dec 07, 2016 at 05:46:09PM +0530, Atul Raj wrote:
> > > Instead of using:
> > > if (cond) {
> > >WARN_ON(1);
> > >do_stuff();
> > > }
> > >
> > > Use a better pattern
On 7 Dec 2016 18:56, "Greg KH" wrote:
>
> On Wed, Dec 07, 2016 at 05:46:09PM +0530, Atul Raj wrote:
> > 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
On Wed, Dec 07, 2016 at 05:46:09PM +0530, Atul Raj wrote:
> 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();
Why? What does this help with?
And why are you sending patch
On Fri, Dec 02, 2016 at 09:06:19AM +, Atul Raj wrote:
> On 2 Dec 2016 2:18 p.m., "Atul Raj" wrote:
> >
> >
> >
> > >Instead of using:
> > >if (cond) {
> > > WARN_ON(1);
> > > do_stuff();
> > >}
> > >
> > >Use a better pattern with WARN_ON() placed in if condition:
> > >
> > >
On 2 Dec 2016 2:18 p.m., "Atul Raj" wrote:
>
>
>
> >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
> >---
> >
On 2 Dec 2016 2:17 p.m., "Atul Raj" wrote:
>
>
> >
> >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
> >---
> >