From: Jes Sorensen <jes.sorensen@gmail.com>
To: xiakaixu1987@gmail.com, kvalo@codeaurora.org, chiu@endlessm.com
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Kaixu Xia <kaixuxia@tencent.com>
Subject: Re: [PATCH] rtl8xxxu: remove the unused variable timeout value assignment
Date: Fri, 13 Nov 2020 09:56:01 -0500 [thread overview]
Message-ID: <c09a450d-7b5a-b0fa-c435-b5778de8b05a@gmail.com> (raw)
In-Reply-To: <1605261010-5413-1-git-send-email-kaixuxia@tencent.com>
On 11/13/20 4:50 AM, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.com>
>
> The value of variable timeout is overwritten by the following statement in
> rtl8xxxu_gen1_init_aggregation(), so here the value assignment is useless.
> Remove it.
>
> Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
> ---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index 5cd7ef3..342126b 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -4426,7 +4426,7 @@ void rtl8xxxu_gen1_init_aggregation(struct rtl8xxxu_priv *priv)
> page_thresh = (priv->fops->rx_agg_buf_size / 512);
> if (rtl8xxxu_dma_agg_pages >= 0) {
> if (rtl8xxxu_dma_agg_pages <= page_thresh)
> - timeout = page_thresh;
> + ; /* do nothing */
Sorry this is the wrong way to do this. If the if statement is no longer
needed, then remove it, don't just make it do nothing.
Nack
Jes
prev parent reply other threads:[~2020-11-13 14:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 9:50 xiakaixu1987
2020-11-13 14:56 ` Jes Sorensen [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=c09a450d-7b5a-b0fa-c435-b5778de8b05a@gmail.com \
--to=jes.sorensen@gmail.com \
--cc=chiu@endlessm.com \
--cc=kaixuxia@tencent.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=xiakaixu1987@gmail.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
Powered by JetHome