* [PATCH] rsi: remove set but not used variable 'header_size'
@ 2018-08-31 9:27 YueHaibing
2018-08-31 11:07 ` YueHaibing
[not found] ` <1535786170-169698-1-git-send-email-yuehaibing@huawei.com>
0 siblings, 2 replies; 5+ messages in thread
From: YueHaibing @ 2018-08-31 9:27 UTC (permalink / raw)
To: Kalle Valo, Pavani Muthyala, Kees Cook, Colin Ian King,
Amitkumar Karwar, Prameela Rani Garnepudi, Siva Rebbagondla,
Sushant Kumar Mishra
Cc: YueHaibing, linux-wireless, netdev, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/wireless/rsi/rsi_91x_hal.c: In function 'rsi_send_data_pkt':
drivers/net/wireless/rsi/rsi_91x_hal.c:288:5: warning:
variable 'header_size' set but not used [-Wunused-but-set-variable]
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/wireless/rsi/rsi_91x_hal.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_hal.c b/drivers/net/wireless/rsi/rsi_91x_hal.c
index 01edf96..c4fb319 100644
--- a/drivers/net/wireless/rsi/rsi_91x_hal.c
+++ b/drivers/net/wireless/rsi/rsi_91x_hal.c
@@ -285,7 +285,6 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
struct skb_info *tx_params;
struct ieee80211_bss_conf *bss;
int status = -EINVAL;
- u8 header_size;
if (!skb)
return 0;
@@ -298,7 +297,6 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
vif = info->control.vif;
bss = &vif->bss_conf;
tx_params = (struct skb_info *)info->driver_data;
- header_size = tx_params->internal_hdr_size;
if (((vif->type == NL80211_IFTYPE_STATION) ||
(vif->type == NL80211_IFTYPE_P2P_CLIENT)) &&
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] rsi: remove set but not used variable 'header_size'
2018-08-31 9:27 [PATCH] rsi: remove set but not used variable 'header_size' YueHaibing
@ 2018-08-31 11:07 ` YueHaibing
[not found] ` <1535786170-169698-1-git-send-email-yuehaibing@huawei.com>
1 sibling, 0 replies; 5+ messages in thread
From: YueHaibing @ 2018-08-31 11:07 UTC (permalink / raw)
To: Kalle Valo, Pavani Muthyala, Kees Cook, Colin Ian King,
Amitkumar Karwar, Prameela Rani Garnepudi, Siva Rebbagondla,
Sushant Kumar Mishra
Cc: linux-wireless, netdev, kernel-janitors
On 2018/8/31 17:27, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/rsi/rsi_91x_hal.c: In function 'rsi_send_data_pkt':
> drivers/net/wireless/rsi/rsi_91x_hal.c:288:5: warning:
> variable 'header_size' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/net/wireless/rsi/rsi_91x_hal.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rsi/rsi_91x_hal.c b/drivers/net/wireless/rsi/rsi_91x_hal.c
> index 01edf96..c4fb319 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_hal.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_hal.c
> @@ -285,7 +285,6 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
> struct skb_info *tx_params;
> struct ieee80211_bss_conf *bss;
> int status = -EINVAL;
> - u8 header_size;
>
> if (!skb)
> return 0;
> @@ -298,7 +297,6 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
> vif = info->control.vif;
> bss = &vif->bss_conf;
> tx_params = (struct skb_info *)info->driver_data;
tx_params also can be removed.
Will send V2.
> - header_size = tx_params->internal_hdr_size;
>
> if (((vif->type == NL80211_IFTYPE_STATION) ||
> (vif->type == NL80211_IFTYPE_P2P_CLIENT)) &&
>
>
> .
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] rsi: remove set but not used variables 'header_size' and 'tx_params'
[not found] ` <1535786170-169698-1-git-send-email-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
@ 2018-09-01 7:21 ` YueHaibing
2018-09-01 7:48 ` [PATCH v4] " YueHaibing
1 sibling, 0 replies; 5+ messages in thread
From: YueHaibing @ 2018-09-01 7:21 UTC (permalink / raw)
To: Kalle Valo, Pavani Muthyala, Kees Cook, Colin Ian King,
Amitkumar Karwar, Prameela Rani Garnepudi, Siva Rebbagondla,
Sushant Kumar Mishra
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
On 2018/9/1 15:16, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/rsi/rsi_91x_hal.c: In function 'rsi_send_data_pkt':
> drivers/net/wireless/rsi/rsi_91x_hal.c:288:5: warning:
> variable 'header_size' set but not used [-Wunused-but-set-variable]
>
> 'tx_params' only used for 'header_size' dereferencedï¼Oso also
sorry..., there is some messy code, Also missing changelog, I'll fix.
> can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
> ---
> drivers/net/wireless/rsi/rsi_91x_hal.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/net/wireless/rsi/rsi_91x_hal.c b/drivers/net/wireless/rsi/rsi_91x_hal.c
> index 01edf96..182b066 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_hal.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_hal.c
> @@ -282,10 +282,8 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
> struct rsi_hw *adapter = common->priv;
> struct ieee80211_vif *vif;
> struct ieee80211_tx_info *info;
> - struct skb_info *tx_params;
> struct ieee80211_bss_conf *bss;
> int status = -EINVAL;
> - u8 header_size;
>
> if (!skb)
> return 0;
> @@ -297,8 +295,6 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
> goto err;
> vif = info->control.vif;
> bss = &vif->bss_conf;
> - tx_params = (struct skb_info *)info->driver_data;
> - header_size = tx_params->internal_hdr_size;
>
> if (((vif->type == NL80211_IFTYPE_STATION) ||
> (vif->type == NL80211_IFTYPE_P2P_CLIENT)) &&
>
>
> .
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v4] rsi: remove set but not used variables 'header_size' and 'tx_params'
[not found] ` <1535786170-169698-1-git-send-email-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-09-01 7:21 ` [PATCH v3] rsi: remove set but not used variables 'header_size' and 'tx_params' YueHaibing
@ 2018-09-01 7:48 ` YueHaibing
2018-09-04 8:17 ` Kalle Valo
1 sibling, 1 reply; 5+ messages in thread
From: YueHaibing @ 2018-09-01 7:48 UTC (permalink / raw)
To: Kalle Valo, Pavani Muthyala, Kees Cook, Colin Ian King,
Amitkumar Karwar, Prameela Rani Garnepudi, Siva Rebbagondla,
Sushant Kumar Mishra
Cc: YueHaibing, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/wireless/rsi/rsi_91x_hal.c: In function 'rsi_send_data_pkt':
drivers/net/wireless/rsi/rsi_91x_hal.c:288:5: warning:
variable 'header_size' set but not used [-Wunused-but-set-variable]
'tx_params' only used for 'header_size' dereferenced,so also
can be removed.
Signed-off-by: YueHaibing <yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
v4:add missing changlog,also wipe a messy code in commit log
v3:fix patch title as Siva Rebbagondla suggested
v2:remove unused 'tx_params'
---
drivers/net/wireless/rsi/rsi_91x_hal.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_hal.c b/drivers/net/wireless/rsi/rsi_91x_hal.c
index 01edf96..182b066 100644
--- a/drivers/net/wireless/rsi/rsi_91x_hal.c
+++ b/drivers/net/wireless/rsi/rsi_91x_hal.c
@@ -282,10 +282,8 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
struct rsi_hw *adapter = common->priv;
struct ieee80211_vif *vif;
struct ieee80211_tx_info *info;
- struct skb_info *tx_params;
struct ieee80211_bss_conf *bss;
int status = -EINVAL;
- u8 header_size;
if (!skb)
return 0;
@@ -297,8 +295,6 @@ int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
goto err;
vif = info->control.vif;
bss = &vif->bss_conf;
- tx_params = (struct skb_info *)info->driver_data;
- header_size = tx_params->internal_hdr_size;
if (((vif->type == NL80211_IFTYPE_STATION) ||
(vif->type == NL80211_IFTYPE_P2P_CLIENT)) &&
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v4] rsi: remove set but not used variables 'header_size' and 'tx_params'
2018-09-01 7:48 ` [PATCH v4] " YueHaibing
@ 2018-09-04 8:17 ` Kalle Valo
0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2018-09-04 8:17 UTC (permalink / raw)
To: YueHaibing
Cc: Pavani Muthyala, Kees Cook, Colin Ian King, Amitkumar Karwar,
Prameela Rani Garnepudi, Siva Rebbagondla, Sushant Kumar Mishra,
YueHaibing, linux-wireless, netdev, kernel-janitors
YueHaibing <yuehaibing@huawei.com> wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/rsi/rsi_91x_hal.c: In function 'rsi_send_data_pkt':
> drivers/net/wireless/rsi/rsi_91x_hal.c:288:5: warning:
> variable 'header_size' set but not used [-Wunused-but-set-variable]
>
> 'tx_params' only used for 'header_size' dereferenced,so also
> can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Patch applied to wireless-drivers-next.git, thanks.
ec7eccf7ad1c rsi: remove set but not used variables 'header_size' and 'tx_params'
--
https://patchwork.kernel.org/patch/10584631/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-09-04 12:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-31 9:27 [PATCH] rsi: remove set but not used variable 'header_size' YueHaibing
2018-08-31 11:07 ` YueHaibing
[not found] ` <1535786170-169698-1-git-send-email-yuehaibing@huawei.com>
[not found] ` <1535786170-169698-1-git-send-email-yuehaibing-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-09-01 7:21 ` [PATCH v3] rsi: remove set but not used variables 'header_size' and 'tx_params' YueHaibing
2018-09-01 7:48 ` [PATCH v4] " YueHaibing
2018-09-04 8:17 ` Kalle Valo
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).