Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1242907rwe; Thu, 25 Aug 2022 19:37:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR5kK/uvwF6s9Vzgj4pz4R2bmWLgHGxk768t1QW5qpgIhOBfbwPxZOA8R0RQd6/IAHh8Gx36 X-Received: by 2002:a63:564f:0:b0:425:f2cd:d0ce with SMTP id g15-20020a63564f000000b00425f2cdd0cemr1544078pgm.143.1661481465290; Thu, 25 Aug 2022 19:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661481465; cv=none; d=google.com; s=arc-20160816; b=Ci2Wk4raZ/NkWbT5H+prl0dHP2D5crMxYetG/tHl9A25EHfT76ggqejkIq+VipZODT bh26rDw/9GJ58UDm2qsB1870E4siXglw63nSkK0JCYZ+Hknn7c9PxNaVWKUhBVgjNSPx u/8IqHNMhoFr56/3FaGTAWQn8af/aVJVa4XvWFpn2FWjAXO1b//ZiW7gx0aCpMnREgRG nu3++RhYhPBlsN02W7/vsQIIgalGIH7uxGG/LLK1+nD/8iOhW7OUgXv8h9CNg2BZ7MPh 1Cp9MX0RIhMrBF+bdFVi2aok+WSaLPevW11y5yYtvfijVgMKmv9oJQ1Z7Nv+37Wl+5T2 3GNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=C3imq+L514e7kNtQF/QIT2ipaRW44yZ++e7k38nUUic=; b=Q++oNuih+pmE4G7fmFCV2MXfgxbRVMd/PxkZ5VFC4lqPBSgaqr5N/0DMye3jVe9+Xe PMIz1ok5F8JUC596k5yUKx8UdK6ZIeFarqxG5xhkPacdMuoN/AtHBIXDp1e0EBwtynHL 13kwJPZvzzawvQuq7ccSCq+ISNnN+sB3HxieFpaogPVvnMXkf14zoxUYR4l4rU83ueUs nWc4TUc/RSuiZyuSHX28rD/K2b8tHeTqldGYzysr9lNm870lZ3tSHBkLi3BATIs82h4I aSEZ5hBhq2ExkqLh6vNoVLFAHMScKUiyYCweWJPLgJpuOzgkpB7J6na1Naxv0JNIgQG+ h87w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e21-20020a170902e0d500b001743cb8d6absi133323pla.262.2022.08.25.19.37.34; Thu, 25 Aug 2022 19:37:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244657AbiHZCCt (ORCPT + 99 others); Thu, 25 Aug 2022 22:02:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244653AbiHZCCq (ORCPT ); Thu, 25 Aug 2022 22:02:46 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C9F4CAC83 for ; Thu, 25 Aug 2022 19:02:44 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 23CA51E80D96; Fri, 26 Aug 2022 09:58:30 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ybcgZmHEZ7m6; Fri, 26 Aug 2022 09:58:27 +0800 (CST) Received: from localhost.localdomain (unknown [180.167.10.98]) (Authenticated sender: yuzhe@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id DB4401E80D90; Fri, 26 Aug 2022 09:58:26 +0800 (CST) From: Yu Zhe To: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, paskripkin@gmail.com, gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, liqiong@nfschina.com, Yu Zhe Subject: [PATCH] staging: r8188eu: use time_after_eq(a,b) to replace "a>=b" Date: Fri, 26 Aug 2022 10:01:51 +0800 Message-Id: <20220826020151.10138-1-yuzhe@nfschina.com> X-Mailer: git-send-email 2.11.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org time_after_eq() deals with timer wrapping correctly. Signed-off-by: Yu Zhe --- 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 10550bd2c16d..870d81735b8d 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -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) || -- 2.11.0