staging: ks7010: fixed 'space prohibited after that *' erros.
PATCH 1/1 staging: ks7010: fixed 'space prohibited after that *' erros.
Fixed checkpatch.pl errors related to "space prohibited after that '*' or '&'" in ks_wlan_net.c file.
--- drivers/staging/ks7010/ks_wlan_net.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/ks7010/ks_wlan_net.c +5 -5
@@ -389,7 +389,7 @@ static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info,/* for SLEEP MODE */ if (priv->reg.operation_mode ==MODE_ADHOC || priv->reg.operation_mode ==MODE_INFRASTRUCTURE ) { -memcpy (priv->reg.bssid, (u8 *) & ap_addr->sa_data,ETH_ALEN ); +memcpy (priv->reg.bssid, (u8 *) &ap_addr->sa_data,ETH_ALEN );if (is_valid_ether_addr ((u8 *) priv->reg.bssid)) priv->need_commit |=SME_MODE_SET ;
@@ -2681,7 +2681,7 @@ static int ks_wlan_set_phy_information_timer(struct net_device *dev,return -EPERM ;/* for SLEEP MODE */ if (*uwrq >=0 && *uwrq <=0xFFFF )/* 0-65535 */ - priv->reg.phy_info_timer = (uint16_t ) * uwrq; + priv->reg.phy_info_timer = (uint16_t ) *uwrq;else return -EINVAL ;
@@ -2818,7 +2818,7 @@ static int ks_wlan_set_tx_gain(struct net_device *dev,return -EPERM ;/* for SLEEP MODE */ if (*uwrq >=0 && *uwrq <=0xFF )/* 0-255 */ - priv->gain.TxGain = (uint8_t ) * uwrq; + priv->gain.TxGain = (uint8_t ) *uwrq;else return -EINVAL ;
@@ -2861,7 +2861,7 @@ static int ks_wlan_set_rx_gain(struct net_device *dev,return -EPERM ;/* for SLEEP MODE */ if (*uwrq >=0 && *uwrq <=0xFF )/* 0-255 */ - priv->gain.RxGain = (uint8_t ) * uwrq; + priv->gain.RxGain = (uint8_t ) *uwrq;else return -EINVAL ;
@@ -2904,7 +2904,7 @@ static int ks_wlan_set_region(struct net_device *dev,return -EPERM ;/* for SLEEP MODE */ if (*uwrq >=0x9 && *uwrq <=0xF )/* 0x9-0xf */ - priv->region = (uint8_t ) * uwrq; + priv->region = (uint8_t ) *uwrq;else return -EINVAL ;
Signature · 1 line
2.1.4
Quoted 2 lines · Yamanappagouda Patil
Fixed checkpatch.pl errors related to "space prohibited after that '*' or '&'" in
ks_wlan_net.cfile.
trivia:
drivers/staging/ks7010/ks_wlan_net.c
Quoted 1 line
drivers/staging/ks7010/ks_wlan_net.c +0
-0
[]
drivers/staging/ks7010/ks_wlan_net.c static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info, · line 392
Quoted 6 lines
drivers/staging/ks7010/ks_wlan_net.c +1
-1@@ -389,7 +389,7 @@ static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info,/* for SLEEP MODE */ if (priv->reg.operation_mode ==MODE_ADHOC || priv->reg.operation_mode ==MODE_INFRASTRUCTURE ) { -memcpy (priv->reg.bssid, (u8 *) & ap_addr->sa_data,ETH_ALEN ); +memcpy (priv->reg.bssid, (u8 *) &ap_addr->sa_data,ETH_ALEN );
You could remove the useless cast to (u8 *) too
drivers/staging/ks7010/ks_wlan_net.c static int ks_wlan_set_phy_information_timer(struct net_device *dev, · line 2684
Quoted 8 lines
drivers/staging/ks7010/ks_wlan_net.c +1
-1if (is_valid_ether_addr ((u8 *) priv->reg.bssid)) priv->need_commit |=SME_MODE_SET ;@@ -2681,7 +2681,7 @@ static int ks_wlan_set_phy_information_timer(struct net_device *dev,return -EPERM ;/* for SLEEP MODE */ if (*uwrq >=0 && *uwrq <=0xFFFF )/* 0-65535 */ - priv->reg.phy_info_timer = (uint16_t ) * uwrq; + priv->reg.phy_info_timer = (uint16_t ) *uwrq;
These could be written without the space after the casts
priv->reg.phy_info_timer = (uint16_t)*uwrq;
etc...
drivers/staging/ks7010/ks_wlan_net.c static int ks_wlan_set_phy_information_timer(struct net_device *dev, · line 2687
Quoted 3 lines
drivers/staging/ks7010/ks_wlan_net.c +0
-0else return -EINVAL ;
These tests could be reversed to reduce indentation for the expected cases
if (*uwrq < 0 || *uwrq > 0xffff)etc return -EINVAL; priv->reg.phy_info_timer = (uint16_t)*uwrq;
etc...