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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7 Dec 2016 18:56, "Greg KH" <gregkh@xxxxxxxxxxxxxxxxxxx> 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_stuff();
 >
 > Why?  What does this help with?
 >

 This removed a extra line from code so I suggested the patch.
 I tried to submit the basic patch taking inspiration from below commit
 Please check commit 2bdf6ea5
 Please let me know how does this helped with?

 > And why are you sending patches that are different, yet have identical
 > subject lines?

 I made two different patched but did not notice the subject is same.
 Sorry for that. If you think the patches are worth I will send you the
 patches again.

 >
 > thanks,
 >
 > greg k-h

 I am in learning phase and I will persistently try until I succeed. :)

 Thanks

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux