mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] r8188eu: core: use time_is_after_eq_jiffies() instead of open coding it
@ 2022-02-28  3:14 Qing Wang
  2022-03-05 10:57 ` Martin Kaiser
  0 siblings, 1 reply; 4+ messages in thread
From: Qing Wang @ 2022-02-28  3:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Wang Qing

From: Wang Qing <wangqing@vivo.com>

Use the helper function time_is_{before,after}_jiffies() to improve
code readability.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 drivers/staging/r8188eu/core/rtw_pwrctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
index 46e44ae..9894abb
--- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c
+++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
@@ -102,7 +102,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_is_after_eq_jiffies(adapter->pwrctrlpriv.ips_deny_time))
 		goto exit;
 
 	if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE | WIFI_SITE_MONITOR) ||
-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-08 20:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28  3:14 [PATCH] r8188eu: core: use time_is_after_eq_jiffies() instead of open coding it Qing Wang
2022-03-05 10:57 ` Martin Kaiser
2022-03-07  1:56   ` 回复: " 王擎
2022-03-08 20:44     ` Martin Kaiser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®