* [PATCH] staging: ks7010: fixed 'space prohibited after that *' erros.
@ 2016-12-03 12:59 Yamanappagouda Patil
0 siblings, 0 replies; 3+ messages in thread
From: Yamanappagouda Patil @ 2016-12-03 12:59 UTC (permalink / raw)
To: gregkh; +Cc: wsa, devel, linux-kernel, driverdev-devel, Yamanappagouda Patil
Fixed checkpatch.pl errors related to "space prohibited after that '*'
or '&'" in ks_wlan_net.c file.
Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
---
drivers/staging/ks7010/ks_wlan_net.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index 43bba52..70ba12a 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -389,9 +389,9 @@ 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, &ap_addr->sa_data, ETH_ALEN);
- if (is_valid_ether_addr((u8 *) priv->reg.bssid))
+ if (is_valid_ether_addr((u8 *)priv->reg.bssid))
priv->need_commit |= SME_MODE_SET;
} else {
@@ -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;
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: ks7010: fixed 'space prohibited after that *' erros.
2016-11-24 9:29 Yamanappagouda Patil
@ 2016-11-24 10:26 ` Joe Perches
0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2016-11-24 10:26 UTC (permalink / raw)
To: Yamanappagouda Patil, gregkh; +Cc: wsa, devel, linux-kernel, driverdev-devel
On Thu, 2016-11-24 at 14:59 +0530, Yamanappagouda Patil wrote:
> Fixed checkpatch.pl errors related to "space prohibited after that '*'
> or '&'" in ks_wlan_net.c file.
trivia:
> diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
[]
> @@ -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
> 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;
These could be written without the space after the casts
priv->reg.phy_info_timer = (uint16_t)*uwrq;
etc...
> else
> 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...
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] staging: ks7010: fixed 'space prohibited after that *' erros.
@ 2016-11-24 9:29 Yamanappagouda Patil
2016-11-24 10:26 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Yamanappagouda Patil @ 2016-11-24 9:29 UTC (permalink / raw)
To: gregkh; +Cc: wsa, devel, linux-kernel, driverdev-devel, Yamanappagouda Patil
Fixed checkpatch.pl errors related to "space prohibited after that '*'
or '&'" in ks_wlan_net.c file.
Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
---
drivers/staging/ks7010/ks_wlan_net.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index 43bba52..220364b 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -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;
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-03 13:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-03 12:59 [PATCH] staging: ks7010: fixed 'space prohibited after that *' erros Yamanappagouda Patil
-- strict thread matches above, loose matches on Subject: below --
2016-11-24 9:29 Yamanappagouda Patil
2016-11-24 10:26 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).