From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
Larry Finger <Larry.Finger@lwfinger.net>,
Chaoming Li <chaoming_li@realsil.com.cn>
Cc: "John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: wireless: rtlwifi: rtl8192de: phy.c: Cleaning up uninitialized variables
Date: Sun, 01 Jun 2014 20:38:44 +0400 [thread overview]
Message-ID: <538B5714.6060107@cogentembedded.com> (raw)
In-Reply-To: <1401626948-16183-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Hello.
On 06/01/2014 04:49 PM, Rickard Strandqvist wrote:
> There is a risk that the variable will be used without being initialized.
> This was largely found by using a static code analysis program called cppcheck.
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
> index 3d1f0dd..66abaf6 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/phy.c
> @@ -203,11 +203,11 @@ u32 rtl92d_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask)
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
> u32 returnvalue, originalvalue, bitshift;
> - u8 dbi_direct;
>
> RT_TRACE(rtlpriv, COMP_RF, DBG_TRACE, "regaddr(%#x), bitmask(%#x)\n",
> regaddr, bitmask);
> if (rtlhal->during_mac1init_radioa || rtlhal->during_mac0init_radiob) {
> + u8 dbi_direct = 0;
Empty line is needed here, after declarations, like above.
> /* mac1 use phy0 read radio_b. */
> /* mac0 use phy1 read radio_b. */
> if (rtlhal->during_mac1init_radioa)
WBR, Sergei
next prev parent reply other threads:[~2014-06-01 16:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-01 12:49 [PATCH] net: wireless: rtlwifi: rtl8192de: phy.c: Cleaning up uninitialized variables Rickard Strandqvist
2014-06-01 16:38 ` Sergei Shtylyov [this message]
2014-06-01 16:44 ` Rickard Strandqvist
2014-06-01 19:32 ` Sergei Shtylyov
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=538B5714.6060107@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=Larry.Finger@lwfinger.net \
--cc=chaoming_li@realsil.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=rickard_strandqvist@spectrumdigital.se \
/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;
as well as URLs for NNTP newsgroup(s).