netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pkshih <pkshih@realtek.com>
To: "Larry.Finger@lwfinger.net" <Larry.Finger@lwfinger.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"yuehaibing@huawei.com" <yuehaibing@huawei.com>,
	"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
	"natechancellor@gmail.com" <natechancellor@gmail.com>,
	"hariprasad.kelam@gmail.com" <hariprasad.kelam@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] rtlwifi: btcoex: fix issue possible condition with no effect (if == else)
Date: Thu, 18 Jul 2019 02:45:19 +0000	[thread overview]
Message-ID: <1563417919.4276.0.camel@realtek.com> (raw)
In-Reply-To: <20190712191535.GA4215@hari-Inspiron-1545>

On Fri, 2019-07-12 at 19:15 +0000, Hariprasad Kelam wrote:
> fix below issue reported by coccicheck
> drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:514:1-3:
> WARNING: possible condition with no effect (if == else)
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
>  drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> index 152242a..191dafd0 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c
> @@ -509,13 +509,7 @@ static u32 halbtc_get_wifi_link_status(struct btc_coexist
> *btcoexist)
>  
>  static s32 halbtc_get_wifi_rssi(struct rtl_priv *rtlpriv)
>  {
> -	int undec_sm_pwdb = 0;
> -
> -	if (rtlpriv->mac80211.link_state >= MAC80211_LINKED)
> -		undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
> -	else /* associated entry pwdb */
> -		undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
> -	return undec_sm_pwdb;
> +	return rtlpriv->dm.undec_sm_pwdb;
>  }
>  
>  static bool halbtc_get(void *void_btcoexist, u8 get_type, void *out_buf)

It looks good to me. Thank you.

Acked-by: Ping-Ke Shih <pkshih@realtek.com>



  reply	other threads:[~2019-07-18  2:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12 19:15 [PATCH] rtlwifi: btcoex: fix issue possible condition with no effect (if == else) Hariprasad Kelam
2019-07-18  2:45 ` Pkshih [this message]
2019-07-24 11:52 ` Kalle Valo

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=1563417919.4276.0.camel@realtek.com \
    --to=pkshih@realtek.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=davem@davemloft.net \
    --cc=hariprasad.kelam@gmail.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=yuehaibing@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;
as well as URLs for NNTP newsgroup(s).