Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1167071pxb; Wed, 3 Nov 2021 19:50:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJB6UV9ZQkxZsk95US8jHT/30E8RmIT+OHyQrO4E+bkMTLjvAAmN094brzjN2FeCNe7ca6 X-Received: by 2002:a17:907:1c85:: with SMTP id nb5mr25112474ejc.502.1635994238752; Wed, 03 Nov 2021 19:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635994238; cv=none; d=google.com; s=arc-20160816; b=G17V6smRBwDOGVadwXmDwJC88EuOiHQ+hO07QLFIma1ntkl2E93eYDQi2IcxJyThKu mN66eR0FP1y237BIFDe+HdnJZgWO3/CBYNb/KGKAGzdbA9BqqmNN5wVTNwTpBa/SiAI0 hFOMWn2jp6jneERYy6bNm+nlym6yN6rvpfivnQaEGKrg8iL8nQKfNOVIg042ZZGKGue3 HmzC+KT6fEliDhSGeVZBAJLasYaGHwMsELbKCgpnXblmkWPBXHHuQzg+kPLOPpLKUe5s N2k8gQzr9OCCwyQtZ8bE1bX66dOKdb89yO9d2hQwUyc8AU3/oRuc8ToMtjZ8pS15J9wB Vr7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=s8xVEJHnK8mxFBkRIjbEvPg/yF4uFDtZoStxlT1zOic=; b=CajAwwUu/EacdI/i3U9qHy5EZM1NkaarbDEluCUzDxLt0eiNWXML26LuuuFOw6s5OI ECbdN15VxB8Mu6WMfxormbLDROARjTbSvCccFUUsuvl+08if3z9g9255BsE/jax/jwJL A2T1SZcJHQp3NApaTlMW9XS3S+8WhJI8dMDmOPPvubIkNtNXiIqvvGwJ9wF9F5YXIwnZ PDlSDXLVdyju8n4xb9+GBp/CWoy6l7Imz82cmZjShb0OfqoVBV/HtS2lMuzk11/n18pJ fcB+D0Iwb0RWIaWjYLQ+6e+ejBGsfkPrUEJaSd39wrEkG1u/dpt2P8Q/k99UWpPG8sKi AY6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Lgs6paIz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nb23si7445999ejc.384.2021.11.03.19.50.07; Wed, 03 Nov 2021 19:50:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Lgs6paIz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229787AbhKDCtV (ORCPT + 99 others); Wed, 3 Nov 2021 22:49:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbhKDCtU (ORCPT ); Wed, 3 Nov 2021 22:49:20 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46011C061714 for ; Wed, 3 Nov 2021 19:46:43 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id j9so4146335pgh.1 for ; Wed, 03 Nov 2021 19:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=s8xVEJHnK8mxFBkRIjbEvPg/yF4uFDtZoStxlT1zOic=; b=Lgs6paIzU01mGAH7RPWiMaEk8o0nn/ApZouOO4ovvj6fEove/OM4Yn8ns5Pf+tFcIH MR58i2GiLwVrmUcfPFvUgnmasMkdWP673eswFO2OLesDVc+7Utu5SU7YoZNl0n9k1zvU o9jk8n4aIYm8AzP1FJxzIb3nZ10v6eKGtta+eKtwj1TwkhavgRYy93wG4xzXPjrNCqP8 MNvFmEHTCtJJGGimFxJJH/O0XSXFbSIJ2E3wnSXrpm1D3QCMvYCo1T/W1ndaI35AjGrX LUV9kqj3wC68ep+rAjUwiZ2NRkbrYMCs1/89jHbiEpNUERDfcWbbSHvFzidvTQzR6ZBL imaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=s8xVEJHnK8mxFBkRIjbEvPg/yF4uFDtZoStxlT1zOic=; b=MKVdi1ip1ZhR/KAg52gbJ7X8ZrJBZAJNpfQdYCLhsqZkVj9kw6PK+FIpKnMdiZq3Hp w+4dimhrChm3taZ8z8Mk4RHIEAWeYkzQGcWCRmOSzCJUpyeKucbEvknrCD0Jz8kFBrIT dbH9E0eyPttKc6q7GuG/572URRt/Q+EfiO1qzXFnJ/dnOX//iiPcOg2aal2dI4Ol4yoH cY2qd4IL/IL3iDE9ZmSRcBvuxJmkXlS5/Dvx8xAWIre3k7odPUJ9N5kAN1oUyKv/g2zf 5dW78Hu8LTKWJb/rfXMbCJEnd8du17rfoZK0AxTYueKen7O/jlIGKGInuJEeLkR+Rpm9 34CQ== X-Gm-Message-State: AOAM532GEfCvLbu3hGMHS2AFT5D74BjU33RS3wcfvv0hxKg4GB9/tDNa KZdh/ipaEk1yADtSRZvs/Kc= X-Received: by 2002:a65:684c:: with SMTP id q12mr2299545pgt.125.1635994002350; Wed, 03 Nov 2021 19:46:42 -0700 (PDT) Received: from Sauravs-MacBook-Air.local ([59.95.84.218]) by smtp.gmail.com with ESMTPSA id w13sm2888687pgm.3.2021.11.03.19.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 19:46:42 -0700 (PDT) Date: Thu, 4 Nov 2021 08:16:35 +0530 From: Saurav Girepunje To: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, gregkh@linuxfoundation.org, fmdefrancesco@gmail.com, saurav.girepunje@gmail.com, straube.linux@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com Subject: [PATCH] staging: r8188eu: core: remove the function __nat25_timeout Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove the function __nat25_timeout from rtw_br_ext.c file. This function can be replace by single statement jiffies - NAT25_AGEING_TIME*HZ. Signed-off-by: Saurav Girepunje --- drivers/staging/r8188eu/core/rtw_br_ext.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_br_ext.c b/drivers/staging/r8188eu/core/rtw_br_ext.c index bcd0f9dd64b1..4951f835feaf 100644 --- a/drivers/staging/r8188eu/core/rtw_br_ext.c +++ b/drivers/staging/r8188eu/core/rtw_br_ext.c @@ -105,19 +105,10 @@ static int skb_pull_and_merge(struct sk_buff *skb, unsigned char *src, int len) return 0; } -static unsigned long __nat25_timeout(struct adapter *priv) -{ - unsigned long timeout; - - timeout = jiffies - NAT25_AGEING_TIME*HZ; - - return timeout; -} - static int __nat25_has_expired(struct adapter *priv, struct nat25_network_db_entry *fdb) { - if (time_before_eq(fdb->ageing_timer, __nat25_timeout(priv))) + if (time_before_eq(fdb->ageing_timer, jiffies - NAT25_AGEING_TIME * HZ)) return 1; return 0; -- 2.33.0