From: Greg KH <gregkh@linuxfoundation.org>
To: Wang Hai <wanghai38@huawei.com>
Cc: puranjay12@gmail.com, robsonde@gmail.com, zhengbin13@huawei.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: rtl8192e: remove set but not used variable 'tmpRegC'
Date: Mon, 6 Apr 2020 16:08:03 +0200 [thread overview]
Message-ID: <20200406140803.GB26701@kroah.com> (raw)
In-Reply-To: <1586262964-4582-1-git-send-email-wanghai38@huawei.com>
On Tue, Apr 07, 2020 at 08:36:04AM -0400, Wang Hai wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c: In function rtl92e_start_adapter:
> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:693:15: warning: variable ‘tmpRegC’ set but not used [-Wunused-but-set-variable]
>
> commit 94a799425eee ("rtl8192e: Split into two directories")
> involved this, remove it.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Hai <wanghai38@huawei.com>
> ---
> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> index ddcd788..ff934ae 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> @@ -690,7 +690,7 @@ bool rtl92e_start_adapter(struct net_device *dev)
> u8 tmpvalue;
> u8 ICVersion, SwitchingRegulatorOutput;
> bool bfirmwareok = true;
> - u32 tmpRegA, tmpRegC, TempCCk;
> + u32 tmpRegA, TempCCk;
> int i = 0;
> u32 retry_times = 0;
>
> @@ -889,8 +889,8 @@ bool rtl92e_start_adapter(struct net_device *dev)
> if (priv->IC_Cut >= IC_VersionCut_D) {
> tmpRegA = rtl92e_get_bb_reg(dev, rOFDM0_XATxIQImbalance,
> bMaskDWord);
> - tmpRegC = rtl92e_get_bb_reg(dev, rOFDM0_XCTxIQImbalance,
> - bMaskDWord);
> + rtl92e_get_bb_reg(dev, rOFDM0_XCTxIQImbalance,
> + bMaskDWord);
That is odd, are you sure you aren't supposed to do something with that
value you read?
thanks,
greg k-h
next prev parent reply other threads:[~2020-04-06 14:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-07 12:36 [PATCH] Staging: rtl8192e: remove set but not used variable 'tmpRegC' Wang Hai
2020-04-06 14:08 ` Greg KH [this message]
2020-04-07 14:16 ` Dan Carpenter
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=20200406140803.GB26701@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=puranjay12@gmail.com \
--cc=robsonde@gmail.com \
--cc=wanghai38@huawei.com \
--cc=zhengbin13@huawei.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