netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Denis Efremov <efremov@linux.com>, Kalle Valo <kvalo@codeaurora.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtlwifi: Remove excessive check in _rtl_ps_inactive_ps()
Date: Wed, 25 Sep 2019 19:06:57 -0500	[thread overview]
Message-ID: <bf0e64a5-5072-9706-98d2-cc226ad70380@lwfinger.net> (raw)
In-Reply-To: <20190925205858.30216-1-efremov@linux.com>

On 9/25/19 3:58 PM, Denis Efremov wrote:
> There is no need to check "rtlhal->interface == INTF_PCI" twice in
> _rtl_ps_inactive_ps(). The nested check is always true. Thus, the
> expression can be simplified.
> 
> Signed-off-by: Denis Efremov <efremov@linux.com>
> ---
>   drivers/net/wireless/realtek/rtlwifi/ps.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c
> index 70f04c2f5b17..6a8127539ea7 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/ps.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/ps.c
> @@ -161,8 +161,7 @@ static void _rtl_ps_inactive_ps(struct ieee80211_hw *hw)
>   	if (ppsc->inactive_pwrstate == ERFON &&
>   	    rtlhal->interface == INTF_PCI) {
>   		if ((ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM) &&
> -		    RT_IN_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM) &&
> -		    rtlhal->interface == INTF_PCI) {
> +		    RT_IN_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM)) {
>   			rtlpriv->intf_ops->disable_aspm(hw);
>   			RT_CLEAR_PS_LEVEL(ppsc, RT_PS_LEVEL_ASPM);
>   		}
> 
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Thanks,

Larry


  reply	other threads:[~2019-09-26  0:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 20:58 [PATCH] rtlwifi: Remove excessive check in _rtl_ps_inactive_ps() Denis Efremov
2019-09-26  0:06 ` Larry Finger [this message]
2019-09-26 18:11 ` Markus Elfring
2019-10-01  9:21 ` [PATCH] " 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=bf0e64a5-5072-9706-98d2-cc226ad70380@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=davem@davemloft.net \
    --cc=efremov@linux.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pkshih@realtek.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).