lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bf0e64a5-5072-9706-98d2-cc226ad70380@lwfinger.net>
Date:   Wed, 25 Sep 2019 19:06:57 -0500
From:   Larry Finger <Larry.Finger@...inger.net>
To:     Denis Efremov <efremov@...ux.com>,
        Kalle Valo <kvalo@...eaurora.org>
Cc:     Ping-Ke Shih <pkshih@...ltek.com>,
        "David S. Miller" <davem@...emloft.net>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtlwifi: Remove excessive check in _rtl_ps_inactive_ps()

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@...ux.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@...inger.net>

Thanks,

Larry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ