From patchwork Mon May 8 22:34:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karim Eshapa X-Patchwork-Id: 9716843 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4FCFD602A0 for ; Mon, 8 May 2017 22:34:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EFEB26BE9 for ; Mon, 8 May 2017 22:34:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 339D226E46; Mon, 8 May 2017 22:34:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA0BF26BE9 for ; Mon, 8 May 2017 22:34:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752144AbdEHWeb (ORCPT ); Mon, 8 May 2017 18:34:31 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35094 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751147AbdEHWea (ORCPT ); Mon, 8 May 2017 18:34:30 -0400 Received: by mail-wm0-f65.google.com with SMTP id v4so13676427wmb.2; Mon, 08 May 2017 15:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=X1DXMBU94MR/brun29NWritd4FIeXm2GxPG5vULPuGQ=; b=HICQM4jln0J+mSovVhr7RXs8pzGluGxcJV4iaEyzyVTmINu2kzR6pEuSdsZZzbZxik KWd1Qb9m7AxwWkYqytZMirSi+ElqJ0bHQkixvtMLDkGwytqytm4QoU+AQFM0ft+jMKW+ EpmiAEDntsdjPRTTKUe4xzUC5MVyC7qjfvcXE7ZAMDJSwACn5e7ksHgkxhOG9YfIPmOn 1HF2l3/PxRvBPpS/7ZwtNoVbKFz9jCUU9+HXrc7680uUETRYRVmMIX7adTl/Cj+hHL45 EUrUcPWGbpupbGWCdY1RCKNKkMlKJ2FzBuROQHCOsbyyA1yDINIgNFlFstI6WLlWBIrK fUYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=X1DXMBU94MR/brun29NWritd4FIeXm2GxPG5vULPuGQ=; b=t/uqV6+vryAMriAr4YEru1zOlaiTIkNDrkahcN74lamPTTd89JRbQyg4s08lv38Ctd wgYU3vBdYbqAoWWEbMS1pZ4roP4EeZeIGPnK/O57Q+jWzfORsBy46S3oUvAjN+qDxVk3 8R96lorLN5QxGn9j5IN26rcaTqrv7y0O2p982Wpz5MGutoO2brE7Vpjly/4MaTG19bXV keM+LUrk0bRlBvnkuZDbbSnOuQuWtc+RuBcqH1DjNBeptgxJ21OzKZVF0+Kq37uz+A6u w0ab6/1ZMXb1n1JDdpxL1o1TdDaMGtMPwmBSYbyQL/g2X81ZGMK5AbLuUfqrEKGIWrlN Z9Qg== X-Gm-Message-State: AODbwcA4FHzn28aSnuPy3+N+l2VzgOtRldB7qM0LJ+I7EpA9QG3JkzCx gxJm7WGWPwNKtQ== X-Received: by 10.28.31.136 with SMTP id f130mr6080581wmf.117.1494282868517; Mon, 08 May 2017 15:34:28 -0700 (PDT) Received: from localhost.localdomain ([156.194.60.180]) by smtp.gmail.com with ESMTPSA id z14sm10868702wmz.2.2017.05.08.15.34.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 May 2017 15:34:27 -0700 (PDT) From: Karim Eshapa To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Karim Eshapa Subject: [PATCH] drivers: net: wireless: rsi: rsi_91x_core: Use time_after time comparison Date: Tue, 9 May 2017 00:34:10 +0200 Message-Id: <1494282850-13782-1-git-send-email-karim.eshapa@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use time_after kernel macro for time comparison. Signed-off-by: Karim Eshapa --- drivers/net/wireless/rsi/rsi_91x_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_core.c b/drivers/net/wireless/rsi/rsi_91x_core.c index f3d3995..68f04a7 100644 --- a/drivers/net/wireless/rsi/rsi_91x_core.c +++ b/drivers/net/wireless/rsi/rsi_91x_core.c @@ -306,7 +306,7 @@ void rsi_core_qos_processor(struct rsi_common *common) tstamp_2 = jiffies; mutex_unlock(&common->tx_rxlock); - if (tstamp_2 > tstamp_1 + (300 * HZ / 1000)) + if (time_after(tstamp_2, tstamp_1 + (300 * HZ) / 1000)) schedule(); } }