[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200406140803.GB26701@kroah.com>
Date: Mon, 6 Apr 2020 16:08:03 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Wang Hai <wanghai38@...wei.com>
Cc: puranjay12@...il.com, robsonde@...il.com, zhengbin13@...wei.com,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: rtl8192e: remove set but not used variable
'tmpRegC'
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@...wei.com>
> Signed-off-by: Wang Hai <wanghai38@...wei.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
Powered by blists - more mailing lists