From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Roberta Dobrescu <roberta.dobrescu@gmail.com>,
linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723au: hal: HalDMOutSrc8723A_CE: Removed variables that is never used
Date: Sun, 01 Feb 2015 18:00:07 -0500 [thread overview]
Message-ID: <wrfjk3011bm0.fsf@redhat.com> (raw)
In-Reply-To: <1422716904-5208-1-git-send-email-rickard_strandqvist@spectrumdigital.se> (Rickard Strandqvist's message of "Sat, 31 Jan 2015 16:08:24 +0100")
Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> writes:
> Variable was assigned a value that was never used.
> I have also removed all the code that thereby serves no purpose.
>
> This was found using a static code analysis program called cppcheck
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
> drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c b/drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c
> index 179a1ba..3cbbfb7 100644
> --- a/drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c
> +++ b/drivers/staging/rtl8723au/hal/HalDMOutSrc8723A_CE.c
> @@ -743,10 +743,8 @@ static void _PHY_IQCalibrate(struct rtw_adapter *pAdapter, int result[][8], u8 t
> /* Note: IQ calibration must be performed after loading */
> /* PHY_REG.txt , and radio_a, radio_b.txt */
>
> - u32 bbvalue;
> -
> if (t == 0) {
> - bbvalue = PHY_QueryBBReg(pAdapter, rFPGA0_RFMOD, bMaskDWord);
> + PHY_QueryBBReg(pAdapter, rFPGA0_RFMOD, bMaskDWord);
In this particular case, I'd say to get rid of the call completely.
FPGA0_RFMOD should not have magic side effects just from being read.
Jes
>
> /* Save ADDA parameters, turn Path A ADDA on */
> _PHY_SaveADDARegisters(pAdapter, ADDA_REG, pdmpriv->ADDA_backup, IQK_ADDA_REG_NUM);
> @@ -1047,7 +1045,7 @@ void rtl8723a_phy_iq_calibrate(struct rtw_adapter *pAdapter, bool bReCovery)
> bPathAOK = bPathBOK = true;
> } else {
> RegE94 = RegEB4 = pdmpriv->RegE94 = pdmpriv->RegEB4 = 0x100; /* X default value */
> - RegE9C = RegEBC = pdmpriv->RegE9C = pdmpriv->RegEBC = 0x0; /* Y default value */
> + pdmpriv->RegE9C = pdmpriv->RegEBC = 0x0; /* Y default value */
> }
>
> if ((RegE94 != 0)/*&&(RegEA4 != 0)*/)
next prev parent reply other threads:[~2015-02-01 23:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-31 15:08 [PATCH] staging: rtl8723au: hal: HalDMOutSrc8723A_CE: Removed variables that is never used Rickard Strandqvist
2015-02-01 23:00 ` Jes Sorensen [this message]
2015-02-01 23:17 ` Rickard Strandqvist
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=wrfjk3011bm0.fsf@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rickard_strandqvist@spectrumdigital.se \
--cc=roberta.dobrescu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.