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] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb39e027-7ab4-4062-a895-cac28d37a8a6@quicinc.com>
Date: Wed, 30 Oct 2024 13:55:29 -0700
From: Jeff Johnson <quic_jjohnson@...cinc.com>
To: Colin Ian King <colin.i.king@...il.com>,
        Ping-Ke Shih
	<pkshih@...ltek.com>, Kalle Valo <kvalo@...nel.org>,
        <linux-wireless@...r.kernel.org>
CC: <kernel-janitors@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] wifi: rtw89: 8852a: remove redundant else statement

On 10/30/2024 6:14 AM, Colin Ian King wrote:
> The cascaded if statements covers all 16 bit values in the comparisons
> of dgain and the last else statement is not reachable and hence
> dead code. Remove it.
> 
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>
> ---
>  drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c b/drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c
> index 9db8713ac99b..f3568c4d0af6 100644
> --- a/drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c
> +++ b/drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c
> @@ -2248,8 +2248,6 @@ static s8 _dpk_dgain_mapping(struct rtw89_dev *rtwdev, u16 dgain)
>  		offset = -9;
>  	else if (dgain <= 0x155)

should you drop the test and unconditionally return -12 here?

>  		offset = -12;
> -	else
> -		offset = 0x0;
>  
>  	return offset;
>  }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ