From patchwork Fri Nov 15 21:22: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: 13876937 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2DB30D68BE7 for ; Fri, 15 Nov 2024 21:23:20 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838011.1253945 (Exim 4.92) (envelope-from ) id 1tC3mD-0007G6-FX; Fri, 15 Nov 2024 21:22:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838011.1253945; Fri, 15 Nov 2024 21:22:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mD-0007Fe-9Y; Fri, 15 Nov 2024 21:22:49 +0000 Received: by outflank-mailman (input) for mailman id 838011; Fri, 15 Nov 2024 21:22:48 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mB-0007DI-Uc for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:47 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c0564bf1-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:43 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 1682D206BCE4; Fri, 15 Nov 2024 13:22:42 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c0564bf1-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImMwNTY0YmYxLWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzY0LjIwNzQwOSwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1682D206BCE4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705762; bh=Q64Lap8gGilYnZS8wBYuXVtg6CkDWFgIDR5hpRb/qKY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=TpPSBC6Q0pyCMIPKcOfsvZX/wWIHu4+ejmKY8xw+0GecDvIAUfgwshz01AoOkZ0WD k4gHIei/egZSo7W0NlMAlHYHatQ5bzRsbZtX1NOQvIcE9aFKMDcUHtqmglM484AIGB /3Fdhfw7EN1qT/zCvUp8095p9P9VmicZ+TZgDM0I= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:31 +0000 Subject: [PATCH 01/22] netfilter: conntrack: Cleanup timeout definitions MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-1-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 None of the higher order definitions are used anymore, so remove definitions for minutes, hours, and days timeouts. Convert the seconds denominated timeouts to secs_to_jiffies() Signed-off-by: Easwar Hariharan --- net/netfilter/nf_conntrack_proto_sctp.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c index 4cc97f971264ed779434ab4597dd0162586b3736..6c95ac96fa42a39acafb5b88a7cf8898010e911c 100644 --- a/net/netfilter/nf_conntrack_proto_sctp.c +++ b/net/netfilter/nf_conntrack_proto_sctp.c @@ -39,20 +39,15 @@ static const char *const sctp_conntrack_names[] = { [SCTP_CONNTRACK_HEARTBEAT_SENT] = "HEARTBEAT_SENT", }; -#define SECS * HZ -#define MINS * 60 SECS -#define HOURS * 60 MINS -#define DAYS * 24 HOURS - static const unsigned int sctp_timeouts[SCTP_CONNTRACK_MAX] = { - [SCTP_CONNTRACK_CLOSED] = 10 SECS, - [SCTP_CONNTRACK_COOKIE_WAIT] = 3 SECS, - [SCTP_CONNTRACK_COOKIE_ECHOED] = 3 SECS, - [SCTP_CONNTRACK_ESTABLISHED] = 210 SECS, - [SCTP_CONNTRACK_SHUTDOWN_SENT] = 3 SECS, - [SCTP_CONNTRACK_SHUTDOWN_RECD] = 3 SECS, - [SCTP_CONNTRACK_SHUTDOWN_ACK_SENT] = 3 SECS, - [SCTP_CONNTRACK_HEARTBEAT_SENT] = 30 SECS, + [SCTP_CONNTRACK_CLOSED] = secs_to_jiffies(10), + [SCTP_CONNTRACK_COOKIE_WAIT] = secs_to_jiffies(3), + [SCTP_CONNTRACK_COOKIE_ECHOED] = secs_to_jiffies(3), + [SCTP_CONNTRACK_ESTABLISHED] = secs_to_jiffies(210), + [SCTP_CONNTRACK_SHUTDOWN_SENT] = secs_to_jiffies(3), + [SCTP_CONNTRACK_SHUTDOWN_RECD] = secs_to_jiffies(3), + [SCTP_CONNTRACK_SHUTDOWN_ACK_SENT] = secs_to_jiffies(3), + [SCTP_CONNTRACK_HEARTBEAT_SENT] = secs_to_jiffies(3), }; #define SCTP_FLAG_HEARTBEAT_VTAG_FAILED 1 From patchwork Fri Nov 15 21:22:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876933 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04C56D68BE5 for ; Fri, 15 Nov 2024 21:23:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838010.1253939 (Exim 4.92) (envelope-from ) id 1tC3mD-0007Dl-59; Fri, 15 Nov 2024 21:22:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838010.1253939; Fri, 15 Nov 2024 21:22:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mD-0007De-2Y; Fri, 15 Nov 2024 21:22:49 +0000 Received: by outflank-mailman (input) for mailman id 838010; Fri, 15 Nov 2024 21:22:47 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mB-0007DI-9E for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:47 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c095291f-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:44 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 49A20206BCE5; Fri, 15 Nov 2024 13:22:42 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c095291f-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImMwOTUyOTFmLWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzY0LjQ3NTg0NCwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 49A20206BCE5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705762; bh=mjGmNlPTDeXtBIVnBruZVxnncRcSbkg/ti9M5w2fu78=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Oh5o3W+QiJRTTPFI9dpb9A1AWSAOLDDOB8sqUPea54Qx6kUKHNmkqaArwACWjQxKB D55Uc4+WAewzxsbEk8laNjMjSMPfVawB+Zi45VRw0skgegejDy9IgBYr/0jKgvvqvH DeGMefeFQkwrmneQNUkhORZAjpQMci1rsg92zUBA= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:32 +0000 Subject: [PATCH 02/22] coccinelle: misc: Add secs_to_jiffies script MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-2-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 Suggested-by: Anna-Maria Behnsen Signed-off-by: Easwar Hariharan --- scripts/coccinelle/misc/secs_to_jiffies.cocci | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/scripts/coccinelle/misc/secs_to_jiffies.cocci b/scripts/coccinelle/misc/secs_to_jiffies.cocci new file mode 100644 index 0000000000000000000000000000000000000000..af762b1c0aac8f044f21150bfaafd9efc834ee87 --- /dev/null +++ b/scripts/coccinelle/misc/secs_to_jiffies.cocci @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-only +/// +/// Find usages of: +/// - msecs_to_jiffies(value*1000) +/// - msecs_to_jiffies(value*MSEC_PER_SEC) +/// +// Confidence: High +// Copyright: (C) 2024 Easwar Hariharan Microsoft +// +// Keywords: secs, seconds, jiffies +// + +@@ constant C; @@ + +- msecs_to_jiffies(C * 1000) ++ secs_to_jiffies(C) + +@@ constant C; @@ + +- msecs_to_jiffies(C * MSEC_PER_SEC) ++ secs_to_jiffies(C) From patchwork Fri Nov 15 21:22:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876925 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D6E9D68BE8 for ; Fri, 15 Nov 2024 21:23:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838013.1253958 (Exim 4.92) (envelope-from ) id 1tC3mE-0007YN-72; Fri, 15 Nov 2024 21:22:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838013.1253958; Fri, 15 Nov 2024 21:22:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mE-0007Wi-0r; Fri, 15 Nov 2024 21:22:50 +0000 Received: by outflank-mailman (input) for mailman id 838013; Fri, 15 Nov 2024 21:22:48 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mC-0007DO-LA for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:48 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id c1122312-a397-11ef-99a3-01e77a169b0f; Fri, 15 Nov 2024 22:22:44 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 7A864206BCE6; Fri, 15 Nov 2024 13:22:42 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c1122312-a397-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImMxMTIyMzEyLWEzOTctMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxNzA1NzY1LjMxNjY0Miwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7A864206BCE6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705762; bh=3U0Zq8t5krsiKxal+ZZuXq1UdnH4Ui7697JSzYEOhjI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=m+WMW1w9+VciYFFrFZA0mxoPGvOfjrhYGrAVRbiO/Z38FXEyCYrwD61KeWUrbI1co ciJpLEmJVGwRKy8PLvAHCagPIhXXgMkeOPvwDiMFvy84ueU3pKKi0uGJZ6fL3Jn5Hz Ra5qi3c9a5aFZzpjfWBaC+oXk3VwB4O9Td0lHhlo= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:33 +0000 Subject: [PATCH 03/22] arm: pxa: Convert timeouts to use secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-3-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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 --- arch/arm/mach-pxa/sharpsl_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 72fa2e3fd35318e5a63c121ed7990a56a56b134c..bbbd06bc79bbb94fb258562e5a382acaf3c277b3 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -31,9 +31,9 @@ /* * Constants */ -#define SHARPSL_CHARGE_ON_TIME_INTERVAL (msecs_to_jiffies(1*60*1000)) /* 1 min */ -#define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */ -#define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */ +#define SHARPSL_CHARGE_ON_TIME_INTERVAL (secs_to_jiffies(60)) /* 1 min */ +#define SHARPSL_CHARGE_FINISH_TIME (secs_to_jiffies(10*60)) /* 10 min */ +#define SHARPSL_BATCHK_TIME (secs_to_jiffies(15)) /* 15 sec */ #define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ #define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */ From patchwork Fri Nov 15 21:22:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876935 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA507D68BE4 for ; Fri, 15 Nov 2024 21:23:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838014.1253978 (Exim 4.92) (envelope-from ) id 1tC3mF-00086P-G3; Fri, 15 Nov 2024 21:22:51 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838014.1253978; Fri, 15 Nov 2024 21:22:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mF-00085c-BM; Fri, 15 Nov 2024 21:22:51 +0000 Received: by outflank-mailman (input) for mailman id 838014; Fri, 15 Nov 2024 21:22:49 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mD-0007DO-LI for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:49 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id c19b4253-a397-11ef-99a3-01e77a169b0f; Fri, 15 Nov 2024 22:22:45 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id ADD5A206BCE7; Fri, 15 Nov 2024 13:22:42 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c19b4253-a397-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImMxOWI0MjUzLWEzOTctMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxNzA1NzY2LjIxNTk4LCJzZW5kZXIiOiJlYWhhcmloYUBsaW51eC5taWNyb3NvZnQuY29tIiwicmVjaXBpZW50IjoieGVuLWRldmVsQGxpc3RzLnhlbnByb2plY3Qub3JnIn0= DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com ADD5A206BCE7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705762; bh=2qNmVTIUPIQHjxG6U+oz3oOJorUpDTvltiEua1kgDGM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jwtdE59vuxdQNE0RiS/g1dZX+uqTWG/w9IblshEquJbSzhtkY3Zk6fbDpk+PaYqJ3 QDyNOhOWd9ZJoQqLoj3N42Lk4lBijUYlMVpBY8G/XYg13FKv7CiQTz5tjAvkJe5Ryj q0FRAVEgJKXl2OZRO71N5d2wqJQesfADXbZgbw84= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:34 +0000 Subject: [PATCH 04/22] s390: kernel: Convert timeouts to use secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-4-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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 --- arch/s390/kernel/lgr.c | 3 ++- arch/s390/kernel/time.c | 4 ++-- arch/s390/kernel/topology.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/s390/kernel/lgr.c b/arch/s390/kernel/lgr.c index 6652e54cf3db9fbdd8cfb06f8a0dc1d4c05ae7d7..68021cb38574b122bbe3d9f70e9168305360017b 100644 --- a/arch/s390/kernel/lgr.c +++ b/arch/s390/kernel/lgr.c @@ -166,7 +166,8 @@ static struct timer_list lgr_timer; */ static void lgr_timer_set(void) { - mod_timer(&lgr_timer, jiffies + msecs_to_jiffies(LGR_TIMER_INTERVAL_SECS * MSEC_PER_SEC)); + mod_timer(&lgr_timer, + jiffies + secs_to_jiffies(LGR_TIMER_INTERVAL_SECS)); } /* diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index b713effe057967623f64da8297314fcc42ff1af2..e28c61d39d27c6e89f490e779ff674ba2fe21d3e 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -656,12 +656,12 @@ static void stp_check_leap(void) if (ret < 0) pr_err("failed to set leap second flags\n"); /* arm Timer to clear leap second flags */ - mod_timer(&stp_timer, jiffies + msecs_to_jiffies(14400 * MSEC_PER_SEC)); + mod_timer(&stp_timer, jiffies + secs_to_jiffies(14400)); } else { /* The day the leap second is scheduled for hasn't been reached. Retry * in one hour. */ - mod_timer(&stp_timer, jiffies + msecs_to_jiffies(3600 * MSEC_PER_SEC)); + mod_timer(&stp_timer, jiffies + secs_to_jiffies(3600)); } } diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 813e5da9a9737e05ec3ef85a495fe38cbb40c49b..99095ff3897c1b5337f7e2abcf10f3fe8219ad7c 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c @@ -370,7 +370,7 @@ static void set_topology_timer(void) if (atomic_add_unless(&topology_poll, -1, 0)) mod_timer(&topology_timer, jiffies + msecs_to_jiffies(100)); else - mod_timer(&topology_timer, jiffies + msecs_to_jiffies(60 * MSEC_PER_SEC)); + mod_timer(&topology_timer, jiffies + secs_to_jiffies(60)); } void topology_expect_change(void) From patchwork Fri Nov 15 21:22:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876936 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E56C0D68BD9 for ; Fri, 15 Nov 2024 21:23:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838018.1254004 (Exim 4.92) (envelope-from ) id 1tC3mH-00005R-9P; Fri, 15 Nov 2024 21:22:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838018.1254004; Fri, 15 Nov 2024 21:22:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mG-0008UL-Qh; Fri, 15 Nov 2024 21:22:52 +0000 Received: by outflank-mailman (input) for mailman id 838018; Fri, 15 Nov 2024 21:22:51 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mF-0007DO-8a for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:51 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id c2c30c00-a397-11ef-99a3-01e77a169b0f; Fri, 15 Nov 2024 22:22:47 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id E451D206BCE8; Fri, 15 Nov 2024 13:22:42 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c2c30c00-a397-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImMyYzMwYzAwLWEzOTctMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxNzA1NzY4LjE1MDg1Nywic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E451D206BCE8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705763; bh=uwqJCSe3GXdPjGHghPvDBfnEwZdT0uYA3z4HTDFu1hA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=RVx2emb342NEz2mst6RfMUiki8VYrjbKedjHqPNNNkb4BXhLdZgldqHGBRr6S5V4l ot1jj3ag+tv5arCezMBNlcZVolqJ/kVXCKfLQi6UufSSi9gPBN5Z2YR5EAMTqKRljK uRWcAwELTERtWaAvz5gx5fAH4KPOOU/VcBtZ4kx8= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:35 +0000 Subject: [PATCH 05/22] powerpc/papr_scm: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-5-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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 --- arch/powerpc/platforms/pseries/papr_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c index 9e297f88adc5d97d4dc7b267b0bfebd58e5cf193..9e8086ec66e0f0e555ac27933854c06cfcf91a04 100644 --- a/arch/powerpc/platforms/pseries/papr_scm.c +++ b/arch/powerpc/platforms/pseries/papr_scm.c @@ -543,7 +543,7 @@ static int drc_pmem_query_health(struct papr_scm_priv *p) /* Jiffies offset for which the health data is assumed to be same */ cache_timeout = p->lasthealth_jiffies + - msecs_to_jiffies(MIN_HEALTH_QUERY_INTERVAL * 1000); + secs_to_jiffies(MIN_HEALTH_QUERY_INTERVAL); /* Fetch new health info is its older than MIN_HEALTH_QUERY_INTERVAL */ if (time_after(jiffies, cache_timeout)) From patchwork Fri Nov 15 21:22:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876928 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C799CD68BE0 for ; Fri, 15 Nov 2024 21:23:11 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838015.1253985 (Exim 4.92) (envelope-from ) id 1tC3mF-0008CX-S7; Fri, 15 Nov 2024 21:22:51 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838015.1253985; Fri, 15 Nov 2024 21:22:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mF-0008BR-Lr; Fri, 15 Nov 2024 21:22:51 +0000 Received: by outflank-mailman (input) for mailman id 838015; Fri, 15 Nov 2024 21:22:50 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mE-0007DI-2k for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:50 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c2ba5d17-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:47 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 256D9206BCE9; Fri, 15 Nov 2024 13:22:43 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c2ba5d17-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImMyYmE1ZDE3LWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzY4LjA2MDk2Miwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 256D9206BCE9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705763; bh=cDb5q9ey4rgvzuTMFsMkjW3R4ZHiX3a+lRd3JDjV6+Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=imd3kVk/tJhJYNa/xeixDhpAwYPvx4IlSinPbk/21FlgSBXFMaFV4APntdnbxA1fq WRyS0aWoUlD4yY9/jG3e/ehoXMMrIljBVBgBQNEO519W/APj0YYahRFp6DV4wrhONm 8XT+qK7qOCSuyxWBlS/5K7TjbCkS44CjtifGQlCE= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:36 +0000 Subject: [PATCH 06/22] mm: kmemleak: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-6-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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 --- mm/kmemleak.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 0400f5e8ac60de555f43d85f1d36f67e48b4ebed..2c099d0819b1896390b842af76069a46bffabc23 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1816,7 +1816,7 @@ static int kmemleak_scan_thread(void *arg) * Wait before the first scan to allow the system to fully initialize. */ if (first_run) { - signed long timeout = msecs_to_jiffies(SECS_FIRST_SCAN * 1000); + signed long timeout = secs_to_jiffies(SECS_FIRST_SCAN); first_run = 0; while (timeout && !kthread_should_stop()) timeout = schedule_timeout_interruptible(timeout); @@ -2202,7 +2202,7 @@ void __init kmemleak_init(void) return; jiffies_min_age = msecs_to_jiffies(MSECS_MIN_AGE); - jiffies_scan_wait = msecs_to_jiffies(SECS_SCAN_WAIT * 1000); + jiffies_scan_wait = secs_to_jiffies(SECS_SCAN_WAIT); object_cache = KMEM_CACHE(kmemleak_object, SLAB_NOLEAKTRACE); scan_area_cache = KMEM_CACHE(kmemleak_scan_area, SLAB_NOLEAKTRACE); From patchwork Fri Nov 15 21:22:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876930 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5C34D68BE1 for ; Fri, 15 Nov 2024 21:23:16 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838016.1253990 (Exim 4.92) (envelope-from ) id 1tC3mG-0008Gm-6V; Fri, 15 Nov 2024 21:22:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838016.1253990; Fri, 15 Nov 2024 21:22:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mF-0008Fe-Vv; Fri, 15 Nov 2024 21:22:51 +0000 Received: by outflank-mailman (input) for mailman id 838016; Fri, 15 Nov 2024 21:22:50 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mE-0007DI-A2 for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:50 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c2bd54f9-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:47 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 5C04E206BCEA; Fri, 15 Nov 2024 13:22:43 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c2bd54f9-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImMyYmQ1NGY5LWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzY4LjA5Mjk5Miwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5C04E206BCEA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705763; bh=QYs6jKNkSqRMwxas8zTGS0f9EDen03tWxmE1GsbmPvQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=I95I66JgO1E7XQYaEm7ineOx+2MkduTJSN9e4D1cu0/NE7dcCwPndmzh7i/cNGesc 2yzIBCvlbGPZzvMpNA+k96a1ZOGXJ+A0bPOMF6Lmuw/xKRtew/BB44Qgm554Xu3M7K XgYk3aN7aTdB7omQICy4E1708sGRqDk4h4Xf8u4c= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:37 +0000 Subject: [PATCH 07/22] accel/habanalabs: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-7-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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/accel/habanalabs/common/device.c | 2 +- drivers/accel/habanalabs/common/habanalabs_drv.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c index e0cf3b4343bb081638430f2552ed27431b488ff9..30277ae410d4b742ffb7bddc35498564ff96fe62 100644 --- a/drivers/accel/habanalabs/common/device.c +++ b/drivers/accel/habanalabs/common/device.c @@ -817,7 +817,7 @@ static void device_hard_reset_pending(struct work_struct *work) } queue_delayed_work(hdev->reset_wq, &device_reset_work->reset_work, - msecs_to_jiffies(HL_PENDING_RESET_PER_SEC * 1000)); + secs_to_jiffies(HL_PENDING_RESET_PER_SEC)); } } diff --git a/drivers/accel/habanalabs/common/habanalabs_drv.c b/drivers/accel/habanalabs/common/habanalabs_drv.c index 708dfd10f39c584a6221c29015f4b0323574145a..5ec13f3a46f915e75b04582b28d51ba8bb50be78 100644 --- a/drivers/accel/habanalabs/common/habanalabs_drv.c +++ b/drivers/accel/habanalabs/common/habanalabs_drv.c @@ -362,8 +362,7 @@ static void fixup_device_params_per_asic(struct hl_device *hdev, int timeout) * a different default timeout for Gaudi */ if (timeout == HL_DEFAULT_TIMEOUT_LOCKED) - hdev->timeout_jiffies = msecs_to_jiffies(GAUDI_DEFAULT_TIMEOUT_LOCKED * - MSEC_PER_SEC); + hdev->timeout_jiffies = secs_to_jiffies(GAUDI_DEFAULT_TIMEOUT_LOCKED); hdev->reset_upon_device_release = 0; break; From patchwork Fri Nov 15 21:22:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876932 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 010FBD68BE3 for ; Fri, 15 Nov 2024 21:23:16 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838017.1253996 (Exim 4.92) (envelope-from ) id 1tC3mG-0008Po-MM; Fri, 15 Nov 2024 21:22:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838017.1253996; Fri, 15 Nov 2024 21:22:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mG-0008MY-F2; Fri, 15 Nov 2024 21:22:52 +0000 Received: by outflank-mailman (input) for mailman id 838017; Fri, 15 Nov 2024 21:22:51 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mF-0007DI-2p for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:51 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c31abbac-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:48 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 8FF32206BCEB; Fri, 15 Nov 2024 13:22:43 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c31abbac-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImMzMWFiYmFjLWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzY4LjcwODY2NSwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8FF32206BCEB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705763; bh=GmA2v8FrQkDc3PawrRu1NLBJUu3qRf/naCkvRhlPz0Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=AQnLLRjERYrPiRXzVPhEVdOI2zLkiaTTtu0h8ex88Rh4yJJCvweeNDaisxPAM4okm aUzZzyLz5s6fIGp2xPOyrtkNts2+H40xXXXdKkNXjhayIPxOfHe+ruxbTRrUqhXle2 46t8LcG0ioPljSxshglWdZxLMsfg/70LBRvzOJRk= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:38 +0000 Subject: [PATCH 08/22] drm/xe: Convert timeout to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-8-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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/gpu/drm/xe/xe_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index a1987b554a8d2aa42b29301f2853edddfda7fda5..bb3338ef4191e76128611eeb9531c9d2089db85a 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -502,7 +502,7 @@ static int wait_for_lmem_ready(struct xe_device *xe) drm_dbg(&xe->drm, "Waiting for lmem initialization\n"); start = jiffies; - timeout = start + msecs_to_jiffies(60 * 1000); /* 60 sec! */ + timeout = start + secs_to_jiffies(60); /* 60 sec! */ do { if (signal_pending(current)) From patchwork Fri Nov 15 21:22:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876927 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF4E3D68BD9 for ; Fri, 15 Nov 2024 21:23:11 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838019.1254011 (Exim 4.92) (envelope-from ) id 1tC3mH-0000DZ-UI; Fri, 15 Nov 2024 21:22:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838019.1254011; Fri, 15 Nov 2024 21:22:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mH-0000Bd-CB; Fri, 15 Nov 2024 21:22:53 +0000 Received: by outflank-mailman (input) for mailman id 838019; Fri, 15 Nov 2024 21:22:52 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mG-0007DI-34 for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:52 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c353cabe-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:48 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id C16E420BEBD0; Fri, 15 Nov 2024 13:22:43 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c353cabe-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImMzNTNjYWJlLWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzY5LjA3ODYxMSwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C16E420BEBD0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705763; bh=z5d0KiQ+mxHfS/dtMsbc4ttBd/lyUqPHYPOKqCM1B/M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VBP5tE+91MUeXr01PKBwol/kwfSOvrGFcon5R6GLvth1r2SEL/vDLGmoM3VztkA/D HDCC8H4UjO/VDL4my3JCQHRpPk1aNqcxHWoN43qx7hLXlHFWnlfQU1gMcNN2K2LO5S 3qBHgiY0qCMM5wc+rwKNzT/8mVMznrFpdjl06mtQ= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:39 +0000 Subject: [PATCH 09/22] drm/etnaviv: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-9-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c b/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c index 721d633aece9d4c81f0019e4c55884f26ee61c60..0f5a2c885d0ab7029c7248e15d6ea3c31823b782 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c @@ -100,7 +100,7 @@ int etnaviv_cmdbuf_init(struct etnaviv_cmdbuf_suballoc *suballoc, mutex_unlock(&suballoc->lock); ret = wait_event_interruptible_timeout(suballoc->free_event, suballoc->free_space, - msecs_to_jiffies(10 * 1000)); + secs_to_jiffies(10)); if (!ret) { dev_err(suballoc->dev, "Timeout waiting for cmdbuf space\n"); From patchwork Fri Nov 15 21:22:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876938 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C182BD68BDC for ; Fri, 15 Nov 2024 21:23:21 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838021.1254036 (Exim 4.92) (envelope-from ) id 1tC3mK-0000xw-S0; Fri, 15 Nov 2024 21:22:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838021.1254036; Fri, 15 Nov 2024 21:22:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mK-0000v3-2K; Fri, 15 Nov 2024 21:22:56 +0000 Received: by outflank-mailman (input) for mailman id 838021; Fri, 15 Nov 2024 21:22:53 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mH-0007DO-76 for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:53 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id c3c4b78f-a397-11ef-99a3-01e77a169b0f; Fri, 15 Nov 2024 22:22:49 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 0429F20BEBD1; Fri, 15 Nov 2024 13:22:44 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c3c4b78f-a397-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImMzYzRiNzhmLWEzOTctMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxNzA1NzY5LjgzMDMwNSwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0429F20BEBD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705764; bh=61FzWbZx8SVE6r33ggD3SgPEq3e2wgbU4/WDXmU67Oo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DOmpiPqEYKf9HYvH4vBNIcVvfzhSlsEJngIViJ/nyGqO2XrYUeSBMlaznaVp1W2cu ZUg4grO0SjULjCP+Mukp5XmgB/9DjGqaSbQQ7rTaKzOeVo8jg5BmmuuAlRim9GVths B2tZiF5YDxbFOhKnRrq5+IHUzQ7bgR5YW5x81bkg= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:40 +0000 Subject: [PATCH 10/22] scsi: lpfc: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-10-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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/scsi/lpfc/lpfc_init.c | 18 +++++++++--------- drivers/scsi/lpfc/lpfc_nportdisc.c | 8 ++++---- drivers/scsi/lpfc/lpfc_nvme.c | 2 +- drivers/scsi/lpfc/lpfc_sli.c | 4 ++-- drivers/scsi/lpfc/lpfc_vmid.c | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 0dd451009b07914450dc70f2c981b690557c1d8c..12666c4c7986ae0bdfaa5c8f040b4ea0be64550d 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -598,7 +598,7 @@ lpfc_config_port_post(struct lpfc_hba *phba) jiffies + msecs_to_jiffies(1000 * timeout)); /* Set up heart beat (HB) timer */ mod_timer(&phba->hb_tmofunc, - jiffies + msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL)); + jiffies + secs_to_jiffies(LPFC_HB_MBOX_INTERVAL)); clear_bit(HBA_HBEAT_INP, &phba->hba_flag); clear_bit(HBA_HBEAT_TMO, &phba->hba_flag); phba->last_completion_time = jiffies; @@ -1267,7 +1267,7 @@ lpfc_hb_mbox_cmpl(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq) !test_bit(FC_UNLOADING, &phba->pport->load_flag)) mod_timer(&phba->hb_tmofunc, jiffies + - msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL)); + secs_to_jiffies(LPFC_HB_MBOX_INTERVAL)); return; } @@ -1555,7 +1555,7 @@ lpfc_hb_timeout_handler(struct lpfc_hba *phba) /* If IOs are completing, no need to issue a MBX_HEARTBEAT */ spin_lock_irq(&phba->pport->work_port_lock); if (time_after(phba->last_completion_time + - msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL), + secs_to_jiffies(LPFC_HB_MBOX_INTERVAL), jiffies)) { spin_unlock_irq(&phba->pport->work_port_lock); if (test_bit(HBA_HBEAT_INP, &phba->hba_flag)) @@ -3352,7 +3352,7 @@ lpfc_block_mgmt_io(struct lpfc_hba *phba, int mbx_action) spin_unlock_irqrestore(&phba->hbalock, iflag); if (mbx_action == LPFC_MBX_NO_WAIT) return; - timeout = msecs_to_jiffies(LPFC_MBOX_TMO * 1000) + jiffies; + timeout = secs_to_jiffies(LPFC_MBOX_TMO) + jiffies; spin_lock_irqsave(&phba->hbalock, iflag); if (phba->sli.mbox_active) { actcmd = phba->sli.mbox_active->u.mb.mbxCommand; @@ -4939,14 +4939,14 @@ int lpfc_scan_finished(struct Scsi_Host *shost, unsigned long time) stat = 1; goto finished; } - if (time >= msecs_to_jiffies(30 * 1000)) { + if (time >= secs_to_jiffies(30)) { lpfc_printf_log(phba, KERN_INFO, LOG_INIT, "0461 Scanning longer than 30 " "seconds. Continuing initialization\n"); stat = 1; goto finished; } - if (time >= msecs_to_jiffies(15 * 1000) && + if (time >= secs_to_jiffies(15) && phba->link_state <= LPFC_LINK_DOWN) { lpfc_printf_log(phba, KERN_INFO, LOG_INIT, "0465 Link down longer than 15 " @@ -4960,7 +4960,7 @@ int lpfc_scan_finished(struct Scsi_Host *shost, unsigned long time) if (vport->num_disc_nodes || vport->fc_prli_sent) goto finished; if (!atomic_read(&vport->fc_map_cnt) && - time < msecs_to_jiffies(2 * 1000)) + time < secs_to_jiffies(2)) goto finished; if ((phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE) != 0) goto finished; @@ -5194,8 +5194,8 @@ lpfc_vmid_poll(struct timer_list *t) lpfc_worker_wake_up(phba); /* restart the timer for the next iteration */ - mod_timer(&phba->inactive_vmid_poll, jiffies + msecs_to_jiffies(1000 * - LPFC_VMID_TIMER)); + mod_timer(&phba->inactive_vmid_poll, + jiffies + secs_to_jiffies(LPFC_VMID_TIMER)); } /** diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 4574716c8764fba6d6db103f1f287b7cdb87cebc..4185717f35defbde483b4ff9b1d71c9c3d86a07d 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -914,7 +914,7 @@ lpfc_rcv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, (ndlp->nlp_state >= NLP_STE_ADISC_ISSUE || ndlp->nlp_state <= NLP_STE_PRLI_ISSUE)) { mod_timer(&ndlp->nlp_delayfunc, - jiffies + msecs_to_jiffies(1000 * 1)); + jiffies + secs_to_jiffies(1)); spin_lock_irq(&ndlp->lock); ndlp->nlp_flag |= NLP_DELAY_TMO; spin_unlock_irq(&ndlp->lock); @@ -1355,7 +1355,7 @@ lpfc_rcv_els_plogi_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, } /* Put ndlp in npr state set plogi timer for 1 sec */ - mod_timer(&ndlp->nlp_delayfunc, jiffies + msecs_to_jiffies(1000 * 1)); + mod_timer(&ndlp->nlp_delayfunc, jiffies + secs_to_jiffies(1)); spin_lock_irq(&ndlp->lock); ndlp->nlp_flag |= NLP_DELAY_TMO; spin_unlock_irq(&ndlp->lock); @@ -1975,7 +1975,7 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport, /* Put ndlp in npr state set plogi timer for 1 sec */ mod_timer(&ndlp->nlp_delayfunc, - jiffies + msecs_to_jiffies(1000 * 1)); + jiffies + secs_to_jiffies(1)); spin_lock_irq(&ndlp->lock); ndlp->nlp_flag |= NLP_DELAY_TMO; spin_unlock_irq(&ndlp->lock); @@ -2798,7 +2798,7 @@ lpfc_rcv_prlo_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, if ((ndlp->nlp_flag & NLP_DELAY_TMO) == 0) { mod_timer(&ndlp->nlp_delayfunc, - jiffies + msecs_to_jiffies(1000 * 1)); + jiffies + secs_to_jiffies(1)); spin_lock_irq(&ndlp->lock); ndlp->nlp_flag |= NLP_DELAY_TMO; ndlp->nlp_flag &= ~NLP_NPR_ADISC; diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index fec23c7237304b471e58194726ff7932b0010385..64d7060e0d4cb628c74c0fa22ece2b956155c1ba 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -2236,7 +2236,7 @@ lpfc_nvme_lport_unreg_wait(struct lpfc_vport *vport, * wait. Print a message if a 10 second wait expires and renew the * wait. This is unexpected. */ - wait_tmo = msecs_to_jiffies(LPFC_NVME_WAIT_TMO * 1000); + wait_tmo = secs_to_jiffies(LPFC_NVME_WAIT_TMO); while (true) { ret = wait_for_completion_timeout(lport_unreg_cmp, wait_tmo); if (unlikely(!ret)) { diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 2ec6e55771b45ab70320a9ad1934d5ead2371d4c..b6f19c123e25a00c0eb4444476a7194d6b045824 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -9024,7 +9024,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) /* Start heart beat timer */ mod_timer(&phba->hb_tmofunc, - jiffies + msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL)); + jiffies + secs_to_jiffies(LPFC_HB_MBOX_INTERVAL)); clear_bit(HBA_HBEAT_INP, &phba->hba_flag); clear_bit(HBA_HBEAT_TMO, &phba->hba_flag); phba->last_completion_time = jiffies; @@ -13335,7 +13335,7 @@ lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *phba, int mbx_action) lpfc_sli_mbox_sys_flush(phba); return; } - timeout = msecs_to_jiffies(LPFC_MBOX_TMO * 1000) + jiffies; + timeout = secs_to_jiffies(LPFC_MBOX_TMO) + jiffies; /* Disable softirqs, including timers from obtaining phba->hbalock */ local_bh_disable(); diff --git a/drivers/scsi/lpfc/lpfc_vmid.c b/drivers/scsi/lpfc/lpfc_vmid.c index cc3e4736f2fe29e1fd4afe221c9c7c40ecf382d4..14dbfe954e423acc47d1b1c80160ff193783f500 100644 --- a/drivers/scsi/lpfc/lpfc_vmid.c +++ b/drivers/scsi/lpfc/lpfc_vmid.c @@ -278,7 +278,7 @@ int lpfc_vmid_get_appid(struct lpfc_vport *vport, char *uuid, if (!(vport->phba->pport->vmid_flag & LPFC_VMID_TIMER_ENBLD)) { mod_timer(&vport->phba->inactive_vmid_poll, jiffies + - msecs_to_jiffies(1000 * LPFC_VMID_TIMER)); + secs_to_jiffies(LPFC_VMID_TIMER)); vport->phba->pport->vmid_flag |= LPFC_VMID_TIMER_ENBLD; } } From patchwork Fri Nov 15 21:22:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876929 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D0104D68BD7 for ; Fri, 15 Nov 2024 21:23:16 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838020.1254025 (Exim 4.92) (envelope-from ) id 1tC3mJ-0000oE-N7; Fri, 15 Nov 2024 21:22:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838020.1254025; Fri, 15 Nov 2024 21:22:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mJ-0000lY-9p; Fri, 15 Nov 2024 21:22:55 +0000 Received: by outflank-mailman (input) for mailman id 838020; Fri, 15 Nov 2024 21:22:53 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mH-0007DI-3P for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:53 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c40d2d07-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:49 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 3830420BEBD2; Fri, 15 Nov 2024 13:22:44 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c40d2d07-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM0MGQyZDA3LWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzcwLjI5ODM0OSwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3830420BEBD2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705764; bh=Dy1gfF2eVFD/Tcz72rvAOzLjHn7ysyv4CietmA0q798=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=noox43IaK9YbVWORCWHfqV/2MVwxKsfvDX3VjXOigGPsIAiMak5TX9WjxZ3URKdej P/FLSpjwMlams/nnBrmsqiNRv/USEaAmRfdc7SPaE7Vpmg+hcqoc2z2b7doqNkw54W wdFLT86eEn0mVPHIwhGf7+XKvkRHVCQ9LgbyTw5c= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:41 +0000 Subject: [PATCH 11/22] scsi: arcmsr: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-11-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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/scsi/arcmsr/arcmsr_hba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 35860c61468b02cdb59aa59376ad5ea9be60d12b..fd797e2785490839713f9242014f0adefccc6ddd 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -1044,7 +1044,7 @@ static void arcmsr_init_get_devmap_timer(struct AdapterControlBlock *pacb) static void arcmsr_init_set_datetime_timer(struct AdapterControlBlock *pacb) { timer_setup(&pacb->refresh_timer, arcmsr_set_iop_datetime, 0); - pacb->refresh_timer.expires = jiffies + msecs_to_jiffies(60 * 1000); + pacb->refresh_timer.expires = jiffies + secs_to_jiffies(60); add_timer(&pacb->refresh_timer); } From patchwork Fri Nov 15 21:22:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876923 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F0C7FD68BE1 for ; Fri, 15 Nov 2024 21:23:08 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838023.1254044 (Exim 4.92) (envelope-from ) id 1tC3mL-0001Cs-IB; Fri, 15 Nov 2024 21:22:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838023.1254044; Fri, 15 Nov 2024 21:22:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mL-0001AR-5Q; Fri, 15 Nov 2024 21:22:57 +0000 Received: by outflank-mailman (input) for mailman id 838023; Fri, 15 Nov 2024 21:22:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mI-0007DI-3h for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:54 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c4821d3a-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:50 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 6E2AB20BEBD3; Fri, 15 Nov 2024 13:22:44 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c4821d3a-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM0ODIxZDNhLWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzcwLjg4NzQ5NSwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6E2AB20BEBD3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705764; bh=KRAKVqkmYHFKsYpIbPFWmWMGYVvfzvIpOOiOmhExdwo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Go0aUNLY+uBRc1gulf22NPnT4wn803j0Yofkqbh+DxXkzhV99tx8UWceKEAkUZyjD tejuZgR0LF67pK/elmBAeNnO4NhzZ4R+VTUBXRegmJhIlArTFy4HXwc9kGMh3mQr02 7PyIpQ3LVnHfWOT4NY7AkEac4yki6LEIgx0W/av8= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:42 +0000 Subject: [PATCH 12/22] scsi: pm8001: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-12-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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/scsi/pm8001/pm8001_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 33e1eba62ca12c2555419197ecdbebad817e4a6d..be88890716cc152b4687edf5e204d14bd177e188 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c @@ -734,7 +734,7 @@ static int pm8001_init_sas_add(struct pm8001_hba_info *pm8001_ha) return -EIO; } time_remaining = wait_for_completion_timeout(&completion, - msecs_to_jiffies(60*1000)); // 1 min + secs_to_jiffies(60)); // 1 min if (!time_remaining) { kfree(payload.func_specific); pm8001_dbg(pm8001_ha, FAIL, "get_nvmd_req timeout\n"); From patchwork Fri Nov 15 21:22:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876934 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B273D68BDA for ; Fri, 15 Nov 2024 21:23:18 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838025.1254053 (Exim 4.92) (envelope-from ) id 1tC3mM-0001PV-FC; Fri, 15 Nov 2024 21:22:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838025.1254053; Fri, 15 Nov 2024 21:22:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mL-0001Ly-R0; Fri, 15 Nov 2024 21:22:57 +0000 Received: by outflank-mailman (input) for mailman id 838025; Fri, 15 Nov 2024 21:22:55 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mJ-0007DI-4S for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:55 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c4d7eec9-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:51 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id A3C1720BEBD4; Fri, 15 Nov 2024 13:22:44 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c4d7eec9-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM0ZDdlZWM5LWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzcxLjQ1ODcwNiwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A3C1720BEBD4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705764; bh=pCX0EpdqmyNkdZPLk4Z0q7m89NufhvHb1Y+2Mrmnnrk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=b3Yj+H9ZO7cPCrzGt7MCUXvYWastksRinkPQTfKmYI5YUC6RTlLxuIDl1dZ9vx9cZ n8z6j+Y7jAIeRkA5bNrxlUKB96Yq3j9HWe6QAwTeEGIBKLrl97e7xcYOgedDgu8E7m FFC3fk0sFJpd64ZUMyFxpOhkKDs6flnQbO0zd4cg= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:43 +0000 Subject: [PATCH 13/22] xen/blkback: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-13-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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/block/xen-blkback/blkback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 838064593f62b75f3d937c0c041ea78dedbbaf84..a7c2b04ab943de9cbd69b596aad177a0534f7762 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -544,7 +544,7 @@ static void print_stats(struct xen_blkif_ring *ring) ring->st_rd_req, ring->st_wr_req, ring->st_f_req, ring->st_ds_req, ring->persistent_gnt_c, max_pgrants); - ring->st_print = jiffies + msecs_to_jiffies(10 * 1000); + ring->st_print = jiffies + secs_to_jiffies(10); ring->st_rd_req = 0; ring->st_wr_req = 0; ring->st_oo_req = 0; From patchwork Fri Nov 15 21:22:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876924 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74F11D68BDF for ; Fri, 15 Nov 2024 21:23:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838026.1254060 (Exim 4.92) (envelope-from ) id 1tC3mO-0001ng-1W; Fri, 15 Nov 2024 21:23:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838026.1254060; Fri, 15 Nov 2024 21:22:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mN-0001jL-7b; Fri, 15 Nov 2024 21:22:59 +0000 Received: by outflank-mailman (input) for mailman id 838026; Fri, 15 Nov 2024 21:22:56 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mK-0007DI-3y for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:56 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c548b596-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:51 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id DA1F220BEBD5; Fri, 15 Nov 2024 13:22:44 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c548b596-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM1NDhiNTk2LWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzcyLjIwMDE5Niwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DA1F220BEBD5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705765; bh=YTcGWD0h0ZDgyuZTU2DPl12ZGyATdibDkhzA92Hlf6s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DBa8qjnf5MNMswOkSvV0JQ0FZ5Ed99ngIFRkSTMDnQu36t8YmBRJOYBHSU3QDj3se Fc7TuS2jcyT4LTDRPo4wVBYTyNbI1RA/bW4apXI30r4Q7ECcxM6eooQMWk2K6CFIVq CFABxdq7HpjQyK3+DUwbjslOaeOI5LwZ/vHYLMt0= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:44 +0000 Subject: [PATCH 14/22] gve: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-14-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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. */ From patchwork Fri Nov 15 21:22:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13877338 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06357D68BD7 for ; Fri, 15 Nov 2024 21:34:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838185.1254219 (Exim 4.92) (envelope-from ) id 1tC3wx-0007JD-Og; Fri, 15 Nov 2024 21:33:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838185.1254219; Fri, 15 Nov 2024 21:33:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3wx-0007J6-KA; Fri, 15 Nov 2024 21:33:55 +0000 Received: by outflank-mailman (input) for mailman id 838185; Fri, 15 Nov 2024 21:33:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mL-0007DI-4O for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:57 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c582edd3-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:52 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 17D8D20BEBD6; Fri, 15 Nov 2024 13:22:45 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c582edd3-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM1ODJlZGQzLWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzcyLjU3ODcwNywic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 17D8D20BEBD6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705765; bh=tK04utDeNCseuvXH6irwCudSXxUYSbugurANWfhj/RA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=EeaKXUIdhndTAyki8bUakndKNZ8kLOJGUUMqUnCCfo6p9a/zgVkYL/LMfKrnFK+tG f7KXDookDfXLSuaDjHu+S/m6N1geUmPHCzm2E8/XUOv0uy4oS5S0wjKzm7GAQ4iGTZ d5PjcF/6XEBO/WEPS/wh7fexVacCMlg1D+TYznuQ= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:45 +0000 Subject: [PATCH 15/22] wifi: ath11k: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-15-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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/wireless/ath/ath11k/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/debugfs.c b/drivers/net/wireless/ath/ath11k/debugfs.c index 57281a135dd7fa6b8610636f47873c8bba21053c..bf192529e3fe26a91e72105a77b4c6f849b905ec 100644 --- a/drivers/net/wireless/ath/ath11k/debugfs.c +++ b/drivers/net/wireless/ath/ath11k/debugfs.c @@ -178,7 +178,7 @@ static int ath11k_debugfs_fw_stats_request(struct ath11k *ar, * received 'update stats' event, we keep a 3 seconds timeout in case, * fw_stats_done is not marked yet */ - timeout = jiffies + msecs_to_jiffies(3 * 1000); + timeout = jiffies + secs_to_jiffies(3); ath11k_debugfs_fw_stats_reset(ar); From patchwork Fri Nov 15 21:22:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876931 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6AD4ED68BD8 for ; Fri, 15 Nov 2024 21:23:17 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838027.1254072 (Exim 4.92) (envelope-from ) id 1tC3mP-00021H-HW; Fri, 15 Nov 2024 21:23:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838027.1254072; Fri, 15 Nov 2024 21:23:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mO-0001wc-FC; Fri, 15 Nov 2024 21:23:00 +0000 Received: by outflank-mailman (input) for mailman id 838027; Fri, 15 Nov 2024 21:22:56 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mK-0007DO-88 for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:56 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id c5e47f1c-a397-11ef-99a3-01e77a169b0f; Fri, 15 Nov 2024 22:22:52 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 4F33820BEBD7; Fri, 15 Nov 2024 13:22:45 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c5e47f1c-a397-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM1ZTQ3ZjFjLWEzOTctMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxNzA1NzczLjI0MjA4Nywic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4F33820BEBD7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705765; bh=DTjXQ8JEnxKHPkRfiey8gv8xkSCkh1L+oMakOx6bumQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PrkdMSJsCXq7e/LVXAIqADh6VOx2LSK3q8Voqjd439eNhh8b6N4u5aB1nfKzAe2Tm +kT+vzsuhI8O0/+YRjBVlaEQ5kmFrot1X5DGJclM8+YlYZkjA4xQVjB3ZX/xX3Lrsj FbrAa2GDIV5JdurdApM8LMcIFqaWmUwvCMzOiXGc= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:46 +0000 Subject: [PATCH 16/22] Bluetooth: MGMT: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-16-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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 --- net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index a429661b676a83ec2d34ed7e228195f39a153f9f..ca89c26d04ec64869e6b99de099d343f4c548ce5 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -209,7 +209,7 @@ static const u16 mgmt_untrusted_events[] = { MGMT_EV_EXP_FEATURE_CHANGED, }; -#define CACHE_TIMEOUT msecs_to_jiffies(2 * 1000) +#define CACHE_TIMEOUT secs_to_jiffies(2) #define ZERO_KEY "\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00" From patchwork Fri Nov 15 21:22:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13877343 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6C742D68BD7 for ; Fri, 15 Nov 2024 21:36:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838246.1254279 (Exim 4.92) (envelope-from ) id 1tC3zf-0002xc-CP; Fri, 15 Nov 2024 21:36:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838246.1254279; Fri, 15 Nov 2024 21:36:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3zf-0002xV-9V; Fri, 15 Nov 2024 21:36:43 +0000 Received: by outflank-mailman (input) for mailman id 838246; Fri, 15 Nov 2024 21:36:41 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mM-0007DI-4I for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:58 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c64f9314-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:53 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 88E5C20BEBD8; Fri, 15 Nov 2024 13:22:45 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c64f9314-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM2NGY5MzE0LWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1NzczLjkyMzMyMywic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 88E5C20BEBD8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705765; bh=kyIMdoD81WSCHIuRs3t1IxAuP6vGJ5R59VD+r/6KKK0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hCMeIw/D2+NTRMQJ3FRDpZj2qT/7FbCaDMS9+XIuVvW9RIzS37PIUIxd4jF3sKpOq ONruuQqONZh6MCBIYTovcefPeKanNMMCVBGfAbtnor6PdXfG/kDS1Iyd6np+7CKiaV BV9SmXmoDsx8kPuPU+1F4sBj6APCWtu0lORTDJ94= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:47 +0000 Subject: [PATCH 17/22] staging: vc04_services: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-17-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index 133ed15f3dbcc07dc353c22d8522e11a08ee6f46..6bb2562e071c4e623e51852860c682e047f823df 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -59,7 +59,7 @@ static int bcm2835_audio_send_msg_locked(struct bcm2835_audio_instance *instance if (wait) { if (!wait_for_completion_timeout(&instance->msg_avail_comp, - msecs_to_jiffies(10 * 1000))) { + secs_to_jiffies(10))) { dev_err(instance->dev, "vchi message timeout, msg=%d\n", m->type); return -ETIMEDOUT; From patchwork Fri Nov 15 21:22:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13877346 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B1001D68BD7 for ; Fri, 15 Nov 2024 21:37:55 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838273.1254312 (Exim 4.92) (envelope-from ) id 1tC40c-0004UZ-KZ; Fri, 15 Nov 2024 21:37:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838273.1254312; Fri, 15 Nov 2024 21:37:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC40c-0004Rf-8F; Fri, 15 Nov 2024 21:37:42 +0000 Received: by outflank-mailman (input) for mailman id 838273; Fri, 15 Nov 2024 21:37:40 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mN-0007DI-4d for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:22:59 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c6a03a26-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:54 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id C5D5B20BEBF7; Fri, 15 Nov 2024 13:22:45 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c6a03a26-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM2YTAzYTI2LWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1Nzc0LjQ0MTMzOSwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C5D5B20BEBF7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705765; bh=7RgevXzVOF2wd0QHaqg8sKSXBh3tNnxEZNLAJYHO4/0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=LFvj1omrNM0zZtGffox7sgW5nc9dJZdVTA81Dj/wcPv/4s/wuIVOvUvfZbveDvw4y FuotwM7kePQ1S+NtqBMYs5hCFuKfxjTKCfLm2hLOBes2vr8zw1wp6TV7hkDlej16jx Fb+baeYINJlZ9BwwcItDzf5jhfC0bccWbyd+vUuI= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:48 +0000 Subject: [PATCH 18/22] ceph: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-18-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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 --- fs/ceph/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/quota.c b/fs/ceph/quota.c index 06ee397e0c3a6172592e62dba95cd267cfff0db1..d90eda19bcc4618f98bfed833c10a6071cf2e2ac 100644 --- a/fs/ceph/quota.c +++ b/fs/ceph/quota.c @@ -166,7 +166,7 @@ static struct inode *lookup_quotarealm_inode(struct ceph_mds_client *mdsc, if (IS_ERR(in)) { doutc(cl, "Can't lookup inode %llx (err: %ld)\n", realm->ino, PTR_ERR(in)); - qri->timeout = jiffies + msecs_to_jiffies(60 * 1000); /* XXX */ + qri->timeout = jiffies + secs_to_jiffies(60); /* XXX */ } else { qri->timeout = 0; qri->inode = in; From patchwork Fri Nov 15 21:22:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13877344 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F152D68BD7 for ; Fri, 15 Nov 2024 21:37:31 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838261.1254288 (Exim 4.92) (envelope-from ) id 1tC40F-0003le-K6; Fri, 15 Nov 2024 21:37:19 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838261.1254288; Fri, 15 Nov 2024 21:37:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC40F-0003lX-HP; Fri, 15 Nov 2024 21:37:19 +0000 Received: by outflank-mailman (input) for mailman id 838261; Fri, 15 Nov 2024 21:37:18 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mO-0007DI-56 for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:23:00 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c70f7192-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:54 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 06C52206BCEC; Fri, 15 Nov 2024 13:22:46 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c70f7192-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM3MGY3MTkyLWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1Nzc1LjE3NzUzNywic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 06C52206BCEC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705766; bh=DChbJW+DaqGHGWE0sMF41tmxT4FReQ1FKA/KDyHL32Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hyUr4x0SmruhyF9c/vR8v3QoqKPaKNqXRHaN80CQA/ABgyerOHG1uC/FlE1BJG1ZJ CRMPkjTTeOQg/xepSHO+SvOjz7TT6Fsw5oiwX3exTqn3S8Lu3Gz0gW082RgBKg6fy9 2WD2Rqjpa40SDuhEDGd3pTV1EDPYLPZRKnHzJ7/U= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:49 +0000 Subject: [PATCH 19/22] livepatch: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-19-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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 --- samples/livepatch/livepatch-callbacks-busymod.c | 2 +- samples/livepatch/livepatch-shadow-fix1.c | 2 +- samples/livepatch/livepatch-shadow-mod.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/livepatch/livepatch-callbacks-busymod.c b/samples/livepatch/livepatch-callbacks-busymod.c index 378e2d40271a9717d09eff51d3d3612c679736fc..d0fd801a7c21b7d7939c29d83f9d993badcc9aba 100644 --- a/samples/livepatch/livepatch-callbacks-busymod.c +++ b/samples/livepatch/livepatch-callbacks-busymod.c @@ -45,7 +45,7 @@ static int livepatch_callbacks_mod_init(void) { pr_info("%s\n", __func__); schedule_delayed_work(&work, - msecs_to_jiffies(1000 * 0)); + secs_to_jiffies(0)); return 0; } diff --git a/samples/livepatch/livepatch-shadow-fix1.c b/samples/livepatch/livepatch-shadow-fix1.c index 6701641bf12d454a770e49abeeb0dea92560e55e..948ea1f5760fed2fa27baf478c97cf98ad5c99a8 100644 --- a/samples/livepatch/livepatch-shadow-fix1.c +++ b/samples/livepatch/livepatch-shadow-fix1.c @@ -73,7 +73,7 @@ static struct dummy *livepatch_fix1_dummy_alloc(void) return NULL; d->jiffies_expire = jiffies + - msecs_to_jiffies(1000 * EXPIRE_PERIOD); + secs_to_jiffies(EXPIRE_PERIOD); /* * Patch: save the extra memory location into a SV_LEAK shadow diff --git a/samples/livepatch/livepatch-shadow-mod.c b/samples/livepatch/livepatch-shadow-mod.c index 7e753b0d2fa611524c9e2adbe02c8fa3e9b6015e..79296e6ccb119f521e86a121623855d841c9fc5e 100644 --- a/samples/livepatch/livepatch-shadow-mod.c +++ b/samples/livepatch/livepatch-shadow-mod.c @@ -102,7 +102,7 @@ static __used noinline struct dummy *dummy_alloc(void) return NULL; d->jiffies_expire = jiffies + - msecs_to_jiffies(1000 * EXPIRE_PERIOD); + secs_to_jiffies(EXPIRE_PERIOD); /* Oops, forgot to save leak! */ leak = kzalloc(sizeof(*leak), GFP_KERNEL); @@ -153,7 +153,7 @@ static void alloc_work_func(struct work_struct *work) mutex_unlock(&dummy_list_mutex); schedule_delayed_work(&alloc_dwork, - msecs_to_jiffies(1000 * ALLOC_PERIOD)); + secs_to_jiffies(ALLOC_PERIOD)); } /* @@ -185,15 +185,15 @@ static void cleanup_work_func(struct work_struct *work) mutex_unlock(&dummy_list_mutex); schedule_delayed_work(&cleanup_dwork, - msecs_to_jiffies(1000 * CLEANUP_PERIOD)); + secs_to_jiffies(CLEANUP_PERIOD)); } static int livepatch_shadow_mod_init(void) { schedule_delayed_work(&alloc_dwork, - msecs_to_jiffies(1000 * ALLOC_PERIOD)); + secs_to_jiffies(ALLOC_PERIOD)); schedule_delayed_work(&cleanup_dwork, - msecs_to_jiffies(1000 * CLEANUP_PERIOD)); + secs_to_jiffies(CLEANUP_PERIOD)); return 0; } From patchwork Fri Nov 15 21:22:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13877342 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E4738D68BD7 for ; Fri, 15 Nov 2024 21:36:04 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838231.1254269 (Exim 4.92) (envelope-from ) id 1tC3yx-00026l-2E; Fri, 15 Nov 2024 21:35:59 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838231.1254269; Fri, 15 Nov 2024 21:35:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3yw-00026e-UG; Fri, 15 Nov 2024 21:35:58 +0000 Received: by outflank-mailman (input) for mailman id 838231; Fri, 15 Nov 2024 21:35:58 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mP-0007DI-5G for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:23:01 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c7587f0b-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:55 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 391A4206BCED; Fri, 15 Nov 2024 13:22:46 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c7587f0b-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM3NTg3ZjBiLWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1Nzc1LjY1ODczNywic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 391A4206BCED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705766; bh=94UWkQUgIE+TIBJCr3TB9bjXju243wFFlCrw1pjugTo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=SFgsUzV2pr+7sgkN9ckclI41KlvZ5rbgTJNvcYfQiJkXt/zfibxMELK/nTIaeiHDO ea+s5uVXRp6XFAaIO7MmvRCgTW3Xe5hl6IpUNHPKOVjiYfv0tTkJJCNkRHRjEL8vOu pgAUpMsv2jfhmvY7krwkZWjWRsRmTp18YKKkcVMM= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:50 +0000 Subject: [PATCH 20/22] ALSA: line6: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-20-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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 --- sound/usb/line6/toneport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/usb/line6/toneport.c b/sound/usb/line6/toneport.c index ca2c6f5de407ece21ab69a39ed603e3f10069039..c073b38cd6738176fc6a276d05ed553526573341 100644 --- a/sound/usb/line6/toneport.c +++ b/sound/usb/line6/toneport.c @@ -386,7 +386,7 @@ static int toneport_setup(struct usb_line6_toneport *toneport) toneport_update_led(toneport); schedule_delayed_work(&toneport->line6.startup_work, - msecs_to_jiffies(TONEPORT_PCM_DELAY * 1000)); + secs_to_jiffies(TONEPORT_PCM_DELAY)); return 0; } From patchwork Fri Nov 15 21:22:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13877339 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B04E6D68BD7 for ; Fri, 15 Nov 2024 21:34:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838201.1254239 (Exim 4.92) (envelope-from ) id 1tC3xq-0008KD-8N; Fri, 15 Nov 2024 21:34:50 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838201.1254239; Fri, 15 Nov 2024 21:34:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3xq-0008K4-54; Fri, 15 Nov 2024 21:34:50 +0000 Received: by outflank-mailman (input) for mailman id 838201; Fri, 15 Nov 2024 21:34:49 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mQ-0007DI-5K for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:23:02 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c7b6d9f1-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:55 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 6D0F7206BCEF; Fri, 15 Nov 2024 13:22:46 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c7b6d9f1-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM3YjZkOWYxLWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1Nzc2LjI3NTQ0NSwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6D0F7206BCEF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705766; bh=C//qZdfJfhN40N7nu/AQ5wmq+hj+onzvFzX2KrlsiOc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PgOujrsxbS3CIW2HtLS/dd5ya7VtRG8QHhCZQdBAsTM3cx+kDkUAOUPnWwMnerztw 8X+Y81upKcxyh16cr7IomUwsyHP2XT7qOxm2nnfHsDBJOEcmEz0gtoHQc1mKP3Fi67 1u154eT7RN/hsmnSsi2wJWAYt//zpJk5MiSg9/YM= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:51 +0000 Subject: [PATCH 21/22] nfp: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-21-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 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/netronome/nfp/nfp_net_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index 6e0929af0f725b2b3855c69bbe894e6626c566b3..6925ad985fc9e2d5641feea41ff277107a8dee9c 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -2779,7 +2779,7 @@ static void nfp_net_netdev_init(struct nfp_net *nn) break; } - netdev->watchdog_timeo = msecs_to_jiffies(5 * 1000); + netdev->watchdog_timeo = secs_to_jiffies(5); /* MTU range: 68 - hw-specific max */ netdev->min_mtu = ETH_MIN_MTU; From patchwork Fri Nov 15 21:22:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13877349 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8F414D68BD8 for ; Fri, 15 Nov 2024 21:39:27 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.838308.1254339 (Exim 4.92) (envelope-from ) id 1tC427-000767-3g; Fri, 15 Nov 2024 21:39:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 838308.1254339; Fri, 15 Nov 2024 21:39:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC426-000760-WB; Fri, 15 Nov 2024 21:39:14 +0000 Received: by outflank-mailman (input) for mailman id 838308; Fri, 15 Nov 2024 21:39:13 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tC3mR-0007DI-5c for xen-devel@lists.xenproject.org; Fri, 15 Nov 2024 21:23:03 +0000 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id c8203873-a397-11ef-a0c7-8be0dac302b0; Fri, 15 Nov 2024 22:22:56 +0100 (CET) Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id A22AA206BCEE; Fri, 15 Nov 2024 13:22:46 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c8203873-a397-11ef-a0c7-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzLjc3LjE1NC4xODIiLCJoZWxvIjoibGludXgubWljcm9zb2Z0LmNvbSJ9 X-Custom-Transaction: eyJpZCI6ImM4MjAzODczLWEzOTctMTFlZi1hMGM3LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxNzA1Nzc2Ljk2ODc4Niwic2VuZGVyIjoiZWFoYXJpaGFAbGludXgubWljcm9zb2Z0LmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A22AA206BCEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705766; bh=8an4FgjBOt1s+5Gzupd7mugSuJBcUUHR7ha3x9HR0Ag=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=iplUk1Nduoh9asilHgzn6HQycVN1VFv/mFBOdW0Mpd4aq8sOOirOgItcWBMTidM3Q FvxfPpyBxEWdptBjBV3AGgplTOjNGMgWDICXRk9fFUvguk5wrwqFw5sjChgX9PZPt7 /h1a1SkEI1LPNYXASotI6c+cUqHfSyHVemxnfBAU= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:52 +0000 Subject: [PATCH 22/22] jiffies: Define secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-22-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@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 , Michael Kelley , Thomas Gleixner , Luiz Augusto von Dentz X-Mailer: b4 0.14.2 secs_to_jiffies() is defined in hci_event.c and cannot be reused by other call sites. Hoist it into the core code to allow conversion of the ~1150 usages of msecs_to_jiffies() that either: - use a multiplier value of 1000 or equivalently MSEC_PER_SEC, or - have timeouts that are denominated in seconds (i.e. end in 000) It's implemented as a macro to allow usage in static initializers. This will also allow conversion of yet more sites that use (sec * HZ) directly, and improve their readability. Suggested-by: Michael Kelley Signed-off-by: Easwar Hariharan Signed-off-by: Thomas Gleixner Reviewed-by: Luiz Augusto von Dentz Link: https://lore.kernel.org/all/20241030-open-coded-timeouts-v3-1-9ba123facf88@linux.microsoft.com --- include/linux/jiffies.h | 13 +++++++++++++ net/bluetooth/hci_event.c | 2 -- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 1220f0fbe5bf9fb6c559b4efd603db3e97db9b65..0a7382753c6b636fe285599953e314fb7479ea01 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -526,6 +526,19 @@ static __always_inline unsigned long msecs_to_jiffies(const unsigned int m) } } +/** + * secs_to_jiffies: - convert seconds to jiffies + * @_secs: time in seconds + * + * Conversion is done by simple multiplication with HZ + * + * secs_to_jiffies() is defined as a macro rather than a static inline + * function so it can be used in static initializers. + * + * Return: jiffies value + */ +#define secs_to_jiffies(_secs) ((_secs) * HZ) + extern unsigned long __usecs_to_jiffies(const unsigned int u); #if !(USEC_PER_SEC % HZ) static inline unsigned long _usecs_to_jiffies(const unsigned int u) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 0bbad90ddd6f87e87c03859bae48a7901d39b634..7b35c58bbbeb79f2b50a02212771fb283ba5643d 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -42,8 +42,6 @@ #define ZERO_KEY "\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00" -#define secs_to_jiffies(_secs) msecs_to_jiffies((_secs) * 1000) - /* Handle HCI Event packets */ static void *hci_ev_skb_pull(struct hci_dev *hdev, struct sk_buff *skb,