* [PATCH] staging: rtl8723bs: remove unused variable
@ 2021-04-07 3:18 Jiapeng Chong
2021-04-07 8:20 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Jiapeng Chong @ 2021-04-07 3:18 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Jiapeng Chong
Fix the following gcc warning:
drivers/staging/rtl8723bs/core/rtw_ieee80211.c:657:15: warning: variable
‘sec_idx’ set but not used [-Wunused-but-set-variable].
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index be4cffc..df00a79 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -654,7 +654,7 @@ int rtw_get_wapi_ie(u8 *in_ie, uint in_len, u8 *wapi_ie, u16 *wapi_len)
void rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie, u16 *wpa_len)
{
- u8 authmode, sec_idx, i;
+ u8 authmode, i;
u8 wpa_oui[4] = {0x0, 0x50, 0xf2, 0x01};
uint cnt;
@@ -662,13 +662,11 @@ void rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie
cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_);
- sec_idx = 0;
-
while (cnt < in_len) {
authmode = in_ie[cnt];
if ((authmode == WLAN_EID_VENDOR_SPECIFIC) && (!memcmp(&in_ie[cnt+2], &wpa_oui[0], 4))) {
- RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n rtw_get_wpa_ie: sec_idx =%d in_ie[cnt+1]+2 =%d\n", sec_idx, in_ie[cnt+1]+2));
+ RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n in_ie[cnt+1]+2 =%d\n", in_ie[cnt+1]+2));
if (wpa_ie) {
memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt+1]+2);
@@ -684,7 +682,7 @@ void rtw_get_sec_ie(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len, u8 *wpa_ie
cnt += in_ie[cnt+1]+2; /* get next */
} else {
if (authmode == WLAN_EID_RSN) {
- RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n get_rsn_ie: sec_idx =%d in_ie[cnt+1]+2 =%d\n", sec_idx, in_ie[cnt+1]+2));
+ RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("\n in_ie[cnt+1]+2 =%d\n", in_ie[cnt+1]+2));
if (rsn_ie) {
memcpy(rsn_ie, &in_ie[cnt], in_ie[cnt+1]+2);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8723bs: remove unused variable
2021-04-07 3:18 [PATCH] staging: rtl8723bs: remove unused variable Jiapeng Chong
@ 2021-04-07 8:20 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-04-07 8:20 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: linux-staging, linux-kernel
On Wed, Apr 07, 2021 at 11:18:19AM +0800, Jiapeng Chong wrote:
> Fix the following gcc warning:
>
> drivers/staging/rtl8723bs/core/rtw_ieee80211.c:657:15: warning: variable
> ‘sec_idx’ set but not used [-Wunused-but-set-variable].
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
This does not apply to my tree anymore, please update your branch and
rebase and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8723bs: remove unused variable
2021-05-15 8:21 Luo Meng
@ 2021-05-19 15:49 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-05-19 15:49 UTC (permalink / raw)
To: Luo Meng
Cc: nathan, ndesaulniers, fabioaiuto83, ross.schm.dev, marcocesati,
matthew.v.deangelis, linux-staging
On Sat, May 15, 2021 at 04:21:50PM +0800, Luo Meng wrote:
> Fix the following clang warning:
>
> drivers/staging/rtl8723bs/core/rtw_mlme.c:2356:6:
> warning: variable ‘pframe’ set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Luo Meng <luomeng12@huawei.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_mlme.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> index 4707dba90397..c2bbb66666b0 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
> @@ -2353,12 +2353,11 @@ void rtw_build_wmm_ie_ht(struct adapter *padapter, u8 *out_ie, uint *pout_len)
> {
> unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00};
> int out_len;
> - u8 *pframe;
>
> if (padapter->mlmepriv.qospriv.qos_option == 0) {
> out_len = *pout_len;
> - pframe = rtw_set_ie(out_ie+out_len, WLAN_EID_VENDOR_SPECIFIC,
> - _WMM_IE_Length_, WMM_IE, pout_len);
> + rtw_set_ie(out_ie+out_len, WLAN_EID_VENDOR_SPECIFIC,
> + WMM_IE_Length_, WMM_IE, pout_len);
>
> padapter->mlmepriv.qospriv.qos_option = 1;
> }
> --
> 2.25.4
>
>
Does not apply to my tree :(
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] staging: rtl8723bs: remove unused variable
@ 2021-05-15 8:21 Luo Meng
2021-05-19 15:49 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Luo Meng @ 2021-05-15 8:21 UTC (permalink / raw)
To: gregkh, nathan, ndesaulniers, fabioaiuto83, ross.schm.dev,
marcocesati, matthew.v.deangelis, linux-staging, luomeng12
Fix the following clang warning:
drivers/staging/rtl8723bs/core/rtw_mlme.c:2356:6:
warning: variable ‘pframe’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Luo Meng <luomeng12@huawei.com>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 4707dba90397..c2bbb66666b0 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -2353,12 +2353,11 @@ void rtw_build_wmm_ie_ht(struct adapter *padapter, u8 *out_ie, uint *pout_len)
{
unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00};
int out_len;
- u8 *pframe;
if (padapter->mlmepriv.qospriv.qos_option == 0) {
out_len = *pout_len;
- pframe = rtw_set_ie(out_ie+out_len, WLAN_EID_VENDOR_SPECIFIC,
- _WMM_IE_Length_, WMM_IE, pout_len);
+ rtw_set_ie(out_ie+out_len, WLAN_EID_VENDOR_SPECIFIC,
+ WMM_IE_Length_, WMM_IE, pout_len);
padapter->mlmepriv.qospriv.qos_option = 1;
}
--
2.25.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-05-19 15:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 3:18 [PATCH] staging: rtl8723bs: remove unused variable Jiapeng Chong
2021-04-07 8:20 ` Greg KH
2021-05-15 8:21 Luo Meng
2021-05-19 15:49 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.