Re: [PATCH 07/12] staging: ks7010: move comparison to right hand side

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

 



On Tue, Mar 14, 2017 at 12:17:49PM +0300, Dan Carpenter wrote:
> On Tue, Mar 14, 2017 at 09:54:05AM +1100, Tobin C. Harding wrote:
> > Checkpatch emits WARNING: Comparisons should place the constant on the
> > right side of the test.
> > 
> > Move constant to right hand side of test, modify operator to ensure
> > logic is maintained.
> > 
> > Signed-off-by: Tobin C. Harding <me@xxxxxxxx>
> > ---
> >  drivers/staging/ks7010/ks_wlan_net.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
> > index 59eabb9..cee3971 100644
> > --- a/drivers/staging/ks7010/ks_wlan_net.c
> > +++ b/drivers/staging/ks7010/ks_wlan_net.c
> > @@ -2164,7 +2164,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
> >  				}
> >  			}
> >  			if (ptr == &priv->pmklist.head) {	/* not find address. */
> > -				if (PMK_LIST_MAX > priv->pmklist.size) {	/* new cache data */
> > +				if (priv->pmklist.size <= PMK_LIST_MAX) {	/* new cache data */
> 
> Nope.

Well now, that is embarrassing. Good catch, thanks. This has been
merged but I'll put another patch in tomorrow to fix it.

thanks,
Tobin.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux