staging: r8188eu: use time_after_eq(a,b) to replace "a>=b"
authorYu Zhe <yuzhe@nfschina.com>
Fri, 26 Aug 2022 02:01:51 +0000 (10:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Aug 2022 15:16:37 +0000 (17:16 +0200)
time_after_eq() deals with timer wrapping correctly.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
Link: https://lore.kernel.org/r/20220826020151.10138-1-yuzhe@nfschina.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_pwrctrl.c

index 10550bd..870d817 100644 (file)
@@ -89,7 +89,7 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
        struct wifidirect_info  *pwdinfo = &adapter->wdinfo;
        bool ret = false;
 
-       if (adapter->pwrctrlpriv.ips_deny_time >= jiffies)
+       if (time_after_eq(adapter->pwrctrlpriv.ips_deny_time, jiffies))
                goto exit;
 
        if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE | WIFI_SITE_MONITOR) ||