From patchwork Fri Nov 15 21:26:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13877136 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2BC2D68BDE for ; Fri, 15 Nov 2024 21:27:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F1EB98D000C; Fri, 15 Nov 2024 16:26:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id ECB348D0011; Fri, 15 Nov 2024 16:26:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1DF48D000C; Fri, 15 Nov 2024 16:26:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A1FA08D0011 for ; Fri, 15 Nov 2024 16:26:50 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 65ED81A045C for ; Fri, 15 Nov 2024 21:26:50 +0000 (UTC) X-FDA: 82789613130.05.46BBE29 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf19.hostedemail.com (Postfix) with ESMTP id 39F9E1A000E for ; Fri, 15 Nov 2024 21:25:51 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=kgi+n57x; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf19.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731705920; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YTcGWD0h0ZDgyuZTU2DPl12ZGyATdibDkhzA92Hlf6s=; b=rMqMjg01dABLTLoZsWnerPQI1zdgbJ3cH7vwBJYb+TJ4B5xeVgcqw8m+q+q2QO8PPgfOfX h8g1zElayfDJG2l+NkL/R2iGuZPjxcnMuUp0S/Hvtua8U/XZq+w9hn2c/eypeErXMssUUJ D4AQxyYIlBBB9bxJX7jjO61nQx1m+yo= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=kgi+n57x; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf19.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705920; a=rsa-sha256; cv=none; b=eujiW+P9AaJVcB8Z07ygIua4ue5ajjwS+bZR8oG4LegPDN0qvGlGLnQ9WGxwdeKw2YYWpC bE8T3C0uYOb91cy6PJEjajVNDAO93l8+Htx2VVXVqrfaWneDS6/cHWZvLrIV/2aTlZp5bt z/UGiL28xoddbPb9Ad9WZBfW5ObVa8k= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 3D67F23834C7; Fri, 15 Nov 2024 13:26:44 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3D67F23834C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731706004; bh=YTcGWD0h0ZDgyuZTU2DPl12ZGyATdibDkhzA92Hlf6s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kgi+n57xgjrI+4Gqepq6GlPnqUO2pihV1Dud4yQ2c1OZjf2P0xDWwr3M3tR1eBq1a vDVbKDgW5iQn+Dgdp88SCgfK7MyuioOzZEhii+W9EEl6/VO7bUxJqfEKNKtLWDwsua 4MilbVg5zRzDEtFWaobQFW22HSHuxVekSW69j0Ag= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:26:31 +0000 Subject: [PATCH v2 14/21] gve: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v2-14-911fb7595e79@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v2-0-911fb7595e79@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v2-0-911fb7595e79@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 39F9E1A000E X-Stat-Signature: 4pgm5f91cxcuayit96n63cnppw1sho9m X-HE-Tag: 1731705951-202696 X-HE-Meta: U2FsdGVkX1800vPPwj9o5oF5kWz5XdV4zXLHFFrhonC6vg8FgNZ/43yChSwz1Qs3eSsd4iyxwmny5Uu7Oa+kRB6j3D32kLV7VM9fGU9p0kpZC25tZsQVyB+KpL5etWk1DdBb/oiPhX8JjRkKZjgZbwFy4Mwcf9+joWbN9obmACDHTdT4hDS+QoGh/HZ/xDYvydsLjbShu3yzqyctjAoMAyavywC7PL5JIzNKx/xi4xWu1vDlC2bUFnJcwtYvDZNNBoXFqP7sx2N33cF3g7joGEH+vB0mIBe4lBbmsL/m3le18lW55IFTBPQDhMgYSeACPwzLdrALmacu4KcXVIbhU5m37vzFBiAfq+qcu3BmOeMMcWsGbpyxzDV2Hy57CWWmXkNm7BLsAeoVV/r7MgsoIMtJq0ty78iJwr9BjucjH+RKlI/mnHsEOO/fb/9b1DGc5vUYpDOGLPw0p17Kf4ilE4y6RJ6CUoqxXTK3cHLB4V2SOWML2Cg2VunAwwCEdW46u+WmmXkGALP2cHAYotxMtIqqBQ2RnXSJGH1BvvsIuWwLTzDFlvEa8If61TguTTdUXOJd2fVTSP9dq2yYmEuRk1ZX/DpJQ/qdVa+cvam2OYSbRd1HVErUz677dEKaPLDzJkLak02suqEP5vLuKlNmNsl3nXkhCs5X6/fIR1ICDqpzLFFH86ccTWfgkftETOkhfSld8pmOk09hesK0jqkxk5bq6PxxTBRuvTmSrvTyxvs6NJe3fTfp46gbUkAMxtwIb35VUkXRBxiA9qCRNpalZRuuj+iKB2cf0jZBxd8UbAaFBlqpk6GHYgTaY5ThskTuB0GPoc0r7HcQD2v92kLe5gk9t8IP18ZZ8iOG/qy3S98lvin/s/4Aki1tGP7mwY7KGqtzDlhrzIhkx8f6OIG/WmQ+exa5n0ZAYyuLFI5NhV50BoYLRTygeBJHM8nlyYneToxBAa7hZUutyeuUJ2t kCZIhZx/ 04VJaU4y5cKEG7m0ngPeEnhC9UDJJXruvIq4M8sAM6ByrFhwZBCSuz1P6ZWZVyuO954zMKmSJMF2Es+2kPlr5eAfB65Lp0y3of0FwJezKoySeCeCZiXD1z7xXCKEPkY9a3uHkPHMh1T0f6CG61BDE4XnnXyjMBj3GDwGva7H/Zcpt7rz0IsJLt+jTo8srq3JhZHYdyFMlrTJzktOUPEKXriWMTRBlXKhq8IgoWkCWG5ZZdOJU+jceoXe/wpQNztURu5M42FQhyRRg7OVKFTN8pn6MVd7TqeOfAUle9rgDSLQmQt+b1qLCL8ksnDoEpQV+JLFS/cbqen0K9OQ3w8TcGXkyOe7kq+bAENt7ezC+KVx7/dWQHc+XDQOh9KOXx9NvMYMlCxtOqPZbDXPxb02NNit3LfmqHODVe/PmGFQ9xcF+VghxX/J9BfG1DHj8z7rzpMNe X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- drivers/net/ethernet/google/gve/gve_tx_dqo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/google/gve/gve_tx_dqo.c b/drivers/net/ethernet/google/gve/gve_tx_dqo.c index f879426cb5523a7e150f363b5e57b9d472b5817c..394debc62268aadf2579f9b516e045cb48287e7c 100644 --- a/drivers/net/ethernet/google/gve/gve_tx_dqo.c +++ b/drivers/net/ethernet/google/gve/gve_tx_dqo.c @@ -1146,8 +1146,7 @@ static void gve_handle_miss_completion(struct gve_priv *priv, /* jiffies can wraparound but time comparisons can handle overflows. */ pending_packet->timeout_jiffies = jiffies + - msecs_to_jiffies(GVE_REINJECT_COMPL_TIMEOUT * - MSEC_PER_SEC); + secs_to_jiffies(GVE_REINJECT_COMPL_TIMEOUT); add_to_list(tx, &tx->dqo_compl.miss_completions, pending_packet); *bytes += pending_packet->skb->len; @@ -1191,8 +1190,7 @@ static void remove_miss_completions(struct gve_priv *priv, pending_packet->state = GVE_PACKET_STATE_TIMED_OUT_COMPL; pending_packet->timeout_jiffies = jiffies + - msecs_to_jiffies(GVE_DEALLOCATE_COMPL_TIMEOUT * - MSEC_PER_SEC); + secs_to_jiffies(GVE_DEALLOCATE_COMPL_TIMEOUT); /* Maintain pending packet in another list so the packet can be * unallocated at a later time. */