From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>,
pkshih@realtek.com, linux-wireless@vger.kernel.org
Cc: kvalo@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH wireless-next] wifi: rtw88: Fix an unreachable code issue
Date: Fri, 22 Nov 2024 21:10:09 +0200 [thread overview]
Message-ID: <773afd3d-91f0-4dc6-abf8-481d3125c047@gmail.com> (raw)
In-Reply-To: <20241122121459.134107-1-dheeraj.linuxdev@gmail.com>
On 22/11/2024 14:14, Dheeraj Reddy Jonnalagadda wrote:
> The error handling in rtw8821a_iqk_tx_vdf_true() contained unreachable
> code due to tx_fail being explicitly set to false before the error check.
> This prevented proper handling of failures and resulted in dead code.
>
> Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
> ---
> drivers/net/wireless/realtek/rtw88/rtw8821a.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821a.c b/drivers/net/wireless/realtek/rtw88/rtw8821a.c
> index db242c9ad68f..c06ba7d615df 100644
> --- a/drivers/net/wireless/realtek/rtw88/rtw8821a.c
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8821a.c
> @@ -221,8 +221,6 @@ static void rtw8821a_iqk_tx_vdf_true(struct rtw_dev *rtwdev, u32 cal,
> /* Originally: if (~tx_fail) {
> * It looks like a typo, so make it more explicit.
> */
> - tx_fail = false;
> -
> if (!tx_fail) {
> rtw_write32(rtwdev, REG_RFECTL_A,
> 0x02000000);
It's like that on purpose, as you can see from the comment.
Your patch changes the behaviour of the code. If it really bothers you,
fix it without changing the behaviour.
Also, you should mention in the commit message if you tested
with real hardware or not, and what tool brought this problem
to your attention.
prev parent reply other threads:[~2024-11-22 19:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-22 12:14 [PATCH wireless-next] wifi: rtw88: Fix an unreachable code issue Dheeraj Reddy Jonnalagadda
2024-11-22 19:10 ` Bitterblue Smith [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=773afd3d-91f0-4dc6-abf8-481d3125c047@gmail.com \
--to=rtl8821cerfe2@gmail.com \
--cc=dheeraj.linuxdev@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox