lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 12 Sep 2022 02:00:29 +0000
From:   Ping-Ke Shih <pkshih@...ltek.com>
To:     sunliming <sunliming@...inos.cn>,
        "kvalo@...nel.org" <kvalo@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>
CC:     "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "kelulanainsley@...il.com" <kelulanainsley@...il.com>,
        kernel test robot <lkp@...el.com>
Subject: RE: [PATCH] rtw89: coex: fix for variable set but not used warning


> -----Original Message-----
> From: sunliming <sunliming@...inos.cn>
> Sent: Monday, September 12, 2022 9:44 AM
> To: Ping-Ke Shih <pkshih@...ltek.com>; kvalo@...nel.org; davem@...emloft.net; edumazet@...gle.com;
> kuba@...nel.org; pabeni@...hat.com
> Cc: linux-wireless@...r.kernel.org; netdev@...r.kernel.org; kelulanainsley@...il.com; sunliming
> <sunliming@...inos.cn>; kernel test robot <lkp@...el.com>
> Subject: [PATCH] rtw89: coex: fix for variable set but not used warning

The subject should be 'wifi: rtw89: coex: ...'.

> 
> Fix below kernel warning:
> drivers/net/wireless/realtek/rtw89/coex.c:3244:25: warning: variable 'cnt_connecting'
> set but not used [-Wunused-but-set-variable]
> 
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: sunliming <sunliming@...inos.cn>
> ---
>  drivers/net/wireless/realtek/rtw89/coex.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c
> index 683854bba217..ee4817358c35 100644
> --- a/drivers/net/wireless/realtek/rtw89/coex.c
> +++ b/drivers/net/wireless/realtek/rtw89/coex.c
> @@ -3290,7 +3290,7 @@ static void _update_wl_info(struct rtw89_dev *rtwdev)
>  	struct rtw89_btc_wl_link_info *wl_linfo = wl->link_info;
>  	struct rtw89_btc_wl_role_info *wl_rinfo = &wl->role_info;
>  	struct rtw89_btc_wl_dbcc_info *wl_dinfo = &wl->dbcc_info;
> -	u8 i, cnt_connect = 0, cnt_connecting = 0, cnt_active = 0;
> +	u8 i, cnt_connect = 0, cnt_active = 0;
>  	u8 cnt_2g = 0, cnt_5g = 0, phy;
>  	u32 wl_2g_ch[2] = {0}, wl_5g_ch[2] = {0};
>  	bool b2g = false, b5g = false, client_joined = false;
> @@ -3324,9 +3324,7 @@ static void _update_wl_info(struct rtw89_dev *rtwdev)
> 
>  		if (wl_linfo[i].connected == MLME_NO_LINK) {
>  			continue;
> -		} else if (wl_linfo[i].connected == MLME_LINKING) {
> -			cnt_connecting++;
> -		} else {
> +		} else if (wl_linfo[i].connected != MLME_LINKING) {
>  			cnt_connect++;
>  			if ((wl_linfo[i].role == RTW89_WIFI_ROLE_P2P_GO ||
>  			     wl_linfo[i].role == RTW89_WIFI_ROLE_AP) &&

Though this patch can fix warning, we would like to show cnt_connecting in 
debug message, and then we can know the transient state between no link and 
connected. I will send it by myself.

So, nack this patch.

--
Ping-Ke

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ