staging: ks7010: remove unnecessary parentheses
PATCH 1/1 staging: ks7010: remove unnecessary parentheses
Remove redundant parentheses
Signed-off-by Joel Camilo Chang Gonzalez <[email protected]>
--- drivers/staging/ks7010/ks_wlan_net.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/ks7010/ks_wlan_net.c +6 -6
@@ -193,14 +193,14 @@ static int ks_wlan_set_freq(struct net_device *dev, fwrq->freq.m = c +1 ; }/* Setting by channel number */ -if ((fwrq->freq.m >1000 ) || (fwrq->freq.e >0 )) +if (fwrq->freq.m >1000 || fwrq->freq.e >0 )return -EOPNOTSUPP ; channel = fwrq->freq.m;/* We should do a better check than that, * based on the card capability !!! */ -if ((channel <1 ) || (channel >14 )) { +if (channel <1 || channel >14 ) {netdev_dbg (dev,"%s: New channel value of %d is invalid!\n" , dev->name, fwrq->freq.m);return -EINVAL ;
@@ -663,7 +663,7 @@ static int ks_wlan_set_rts(struct net_device *dev, struct iw_request_info *info,/* for SLEEP MODE */ if (vwrq->rts.disabled) rthr =2347 ; -if ((rthr <0 ) || (rthr >2347 )) +if (rthr <0 || rthr >2347 )return -EINVAL ; priv->reg.rts = rthr;
@@ -701,7 +701,7 @@ static int ks_wlan_set_frag(struct net_device *dev,/* for SLEEP MODE */ if (vwrq->frag.disabled) fthr =2346 ; -if ((fthr <256 ) || (fthr >2346 )) +if (fthr <256 || fthr >2346 )return -EINVAL ; fthr &= ~0x1 ;/* Get an even value - is it really needed ??? */
@@ -780,7 +780,7 @@ static int ks_wlan_set_encode(struct net_device *dev,return -EINVAL ;/* for SLEEP MODE */ -if ((index <0 ) || (index >4 )) +if (index <0 || index >4 )return -EINVAL ; index = (index ==0 ) ? priv->reg.wep_index : (index -1 );
@@ -881,7 +881,7 @@ static int ks_wlan_get_encode(struct net_device *dev, }/* Which key do we want ? -1 -> tx index */ -if ((index <0 ) || (index >=4 )) +if (index <0 || index >=4 ) index = priv->reg.wep_index;if (priv->reg.privacy_invoked) { enc->flags &= ~IW_ENCODE_DISABLED ;
Signature · 1 line
2.37.2
Greg KH
maintainerQuoted 12 lines · Joel Camilo Chang Gonzalez
Remove redundant parentheses
Signed-off-by Joel Camilo Chang Gonzalez <[email protected]>--- drivers/staging/ks7010/ks_wlan_net.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)drivers/staging/ks7010/ks_wlan_net.c +0
-0
drivers/staging/ks7010/ks_wlan_net.c static int ks_wlan_set_freq(struct net_device *dev, · line 196
Quoted 5 lines
drivers/staging/ks7010/ks_wlan_net.c +1
-1@@ -193,14 +193,14 @@ static int ks_wlan_set_freq(struct net_device *dev, fwrq->freq.m = c +1 ; }/* Setting by channel number */ -if ((fwrq->freq.m >1000 ) || (fwrq->freq.e >0 )) +if (fwrq->freq.m >1000 || fwrq->freq.e >0 )
Do you want to have to remember the precidence order between "||" and ">"? I don't, so please don't make this change.
thanks,
greg k-h