From patchwork Tue Dec 10 22:02: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: 13902166 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A2B6E7717F for ; Tue, 10 Dec 2024 22:02:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D2AAD6B0096; Tue, 10 Dec 2024 17:02:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CAE6E6B008C; Tue, 10 Dec 2024 17:02:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B24916B0093; Tue, 10 Dec 2024 17:02:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 91C756B0089 for ; Tue, 10 Dec 2024 17:02:40 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 38D11A0FA2 for ; Tue, 10 Dec 2024 22:02:40 +0000 (UTC) X-FDA: 82880423472.01.EE6EF2E Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf07.hostedemail.com (Postfix) with ESMTP id 10AC040010 for ; Tue, 10 Dec 2024 22:02:14 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=U3VeWMEj; spf=pass (imf07.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868143; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=oAoRcxFx6r3qiWDnRBBsiLzbuwo4yEAyTzO1K822O7I=; b=TMvexKHqmjPsqXJ1oHC6tULEF3WUkJxSbCSlNsIqDl+GeOquCM5bZhO2TCpb/ixObl6SOj jgBDZfTBbkWEhQv9DAqO62cOU5k39y7ZFq/8SA2piZlAFIp36GQ3GSXOuUeZQzTQD4VBmc 19Y9X9N6PSrFv/UyTrVt8Jxxbl31oTY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868143; a=rsa-sha256; cv=none; b=w+9Q4DjyTG787wQp8C2BQk5oB9KiMVjqVTR4xdt17zbCO2Z2LHGdBgLSexC4BF2u4Vkldh DiitY4lzIRUbF61zfzQuqSYPUrACZLA0sunz7jfJizvfRTadHaDjw2WReu+2OGq/tE6tTY CTfOD0VMr1p4eh2rB095y7fqaKc46FU= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=U3VeWMEj; spf=pass (imf07.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 8EC1F2047228; Tue, 10 Dec 2024 14:02:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8EC1F2047228 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868156; bh=oAoRcxFx6r3qiWDnRBBsiLzbuwo4yEAyTzO1K822O7I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=U3VeWMEj1NoccyfU44IlXr+eH+dIb+Y1FX88FHYXU4q03PECflKzMMc2KhmQfWdxA 2LtcSsTBowp5J1k4JjK8tQOvB5yIwMjDbVNHxvHTREwcCEJZMCYyv+0rZVYLLCY+lW lVwyzMWVt2MunqqkcT6KDTr1TpTutKDRbWdkcUjw= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:32 +0000 Subject: [PATCH v3 01/19] netfilter: conntrack: Cleanup timeout definitions MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-1-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 10AC040010 X-Stat-Signature: 83u1j7fdfrk3oyz7eqssi67x7pbuemea X-Rspam-User: X-HE-Tag: 1733868134-612507 X-HE-Meta: U2FsdGVkX191eFiTwUXTJnDIYfAm1ELryF6sAq57kYuBJogDpWCuWzmDO1fNkEV6mf77sYm+yO//8TuE4qRX6KWtI0SZWq6nMXftExk5QEL+rHreKJRl4e5OC/DTip3X0rcK5jCg1TFlj3O/9cySn304SFua40wwtW0Id5CT5a00FZqdvJQGuRhUjUQom2FkANRmMz/XY/oh5MPHPANwcfANuNAHCXWCawOTJC9PlhiltQa9StcucqgQ6RoekRYeSmjgt4EUphTzaPm1PG3MEjuWxNUe2Y2PfAlW4pIBGAQLHaPWk7WJqov3q+0qKZyUg33zDC8X0jlo1WUsdswK7Hd80vPAatd21TOMS+Jr+1jYmibUAno/kJW0CG5J8G3VPKz6xRFsrVAE6OpfqwyZdkYzABKWYW+gY9Kv3ajausa6SgZCmYbPmLpNhqriGfRtpAp9DoiEIvGYJemOf7ks/+Kh8+HAbjPUmJAqlMEoHAFim2ihcisqzWvgI53rhYUPU5WD1u31enTKBSaSmk8w6+o4wzsX47CNfIRitWz5f4AjqQTnLlWrBWjVHHRrm3+z8QinN9H6PgNciD3v5D0MBgVN5mxoMNoG+iIcCjTUI6vHKgEhz9ZmeHdFXQtvWM9dX+F/ZEy+TW6IqV4/r00ZI3KzYT31q05IW5oTbXPclu811iyMD3IeHgQW4U8mYDR/yD8jwen25JF2U698kU2H4jE25tg4OuTyoY9OBXdhZ8oZDhGalPPNGIEei5TXEeciMQFK/WbWje9cmSQdVjJibbXkXlIj9u1iXYEKkWuCghi0snZijTRKkd0ylhOWP7iAIS/QrkDjrUOMQKtCP6g/EBQ92IIBRCGYG3rzxeaD/kKbhUvSSMrPnlf8qybEInvooD2gQ3mMR3VtpQz756AETxO6b+318tIzS9e8aELqKyiwVTcgg2+nQRwwzNKhjRXwyftPrQ1MM/TGeS7P4MT 3DkjoE3+ OLPjIZSwf+lsQdOZLfMQujENmV68zq0RCtdwWG+5wrbDPNxtTS9MZlE7LyAsY2OwK05954bTWPh6TcyHg1abi09/otzRJ/bYrv6Cv52XyaYGDT086JCexSlKyGfHrdNFlZuKBP3EYQnvMgVtoUOWTfrNWtPetya3jeai4BLr5a2AQPaoQrZIYEaL5x0YZdBwkTeYZQjnc86/wYeq0V5x2fVarGbTE5tAb2awbb/NekUt2zViDH6cz6/dkrlaelF+4SDOSMZwYjHM1RKtApge7SSVdD2FhctdOyo1/vhcqFM647X3ZSrqdOS6oMhYmiYDPAZqHMmW/uyfM7UeteA3PB63PWw/KCA9oS9UPr+IQQY2Tu1eCHTp7BPEhCgiJ2BWMXN2R X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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..7c6f7c9f73320dd208bd0940f539bd9e662e62d0 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(30), }; #define SCTP_FLAG_HEARTBEAT_VTAG_FAILED 1 From patchwork Tue Dec 10 22:02: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: 13902168 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 040B9E7717F for ; Tue, 10 Dec 2024 22:02:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6BB8D6B008A; Tue, 10 Dec 2024 17:02:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 644736B008C; Tue, 10 Dec 2024 17:02:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 420CA6B0098; Tue, 10 Dec 2024 17:02:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 0EA486B008C for ; Tue, 10 Dec 2024 17:02:41 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 9B89B140BBF for ; Tue, 10 Dec 2024 22:02:40 +0000 (UTC) X-FDA: 82880423850.12.96E7D9C Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf01.hostedemail.com (Postfix) with ESMTP id CBDE740009 for ; Tue, 10 Dec 2024 22:02:21 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=D0ztEAtB; spf=pass (imf01.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868136; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=p+8g58BSBlt5b8YhFCU18nddw3DZx2oHU0RyK/mdTxg=; b=FkBRs03lPTWdv43fVp6qLvzkUOBoKVAkITyr2n1Y86Y7QAZvek+mSRMjTHtonPxEbCAjXC RHK4fcisILShtw1tsdJoRperQZjFs118RFvfTDiCsVdS2KPpQv9DNqDhVV1ckO9HnnYomq pI92iJS064eXzXBCbvIRoQaRtodwUBw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868136; a=rsa-sha256; cv=none; b=B9M4fAOax8z7wONiD4dtiYK2X4NshcnMmuKDqT2SRKfmf6I8HLqpAAjffO7pR5OLaHqPcq /xuz2bgjEUiIXWrkud8iLAcumy7GawY0enGgsgt9NhH7oS2UscDG7vi3v24FFqwvwjPB/0 38co/4IBpPTuTwMlUVLHCWMxVH3eAL0= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=D0ztEAtB; spf=pass (imf01.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id B8E722047229; Tue, 10 Dec 2024 14:02:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B8E722047229 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868156; bh=p+8g58BSBlt5b8YhFCU18nddw3DZx2oHU0RyK/mdTxg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=D0ztEAtB7CqvQGSZsYp+tRN4xkI1U+Pf0qGPT6ILcEXORWxv5WkL8NhY8sec+1ep2 o0YIUC89qlYyBwdj7sp7PypSXEaSKBYajv+HMKS2o/OP0mphIdTsuM5S4VkeWurXmd SYBz6bHa118hfuIgWOgwAoVQLPZwu51P6o2dfTvU= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:33 +0000 Subject: [PATCH v3 02/19] coccinelle: misc: Add secs_to_jiffies script MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-2-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Queue-Id: CBDE740009 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: t6bpnm9qacm54176uytqut79mdrh9e1t X-HE-Tag: 1733868141-441537 X-HE-Meta: U2FsdGVkX1+QSrNzYULDofh8rsCyeoINnIOhVNdpN4kdisPNqbGifX9tsE/ghocRvagoAK/BNifHdPeSwbVvdkey79cJtJJqtX4ls73SmI46h6s9EsBLc5rb5KbyH098GPcFEFgDk8E4PlNtG84MT9VwwwqqFuIQyUMz1XBnb4W1g0FLrgSCw0C/2ce2tNaIl+2MtY35Mh44bclq1ZfS8R42H5oTMUinCA/xXkMPkoTcinPHLWXoQYs4+JLCFL4Y8Povx0JUMYJXxfYQYMzhb8S7XH4rNNsJu8F97QEbHTKXspk4hS+sJeyj4kPvRKN3Os/BzFrsUyFKvNAvTzZWZxnUkYPSNdjAh/RUIvA2BEHtPy46DFK+sIGtFEBNAtYvh3Q0tszhAEyShjzGJ2zFW4UVfktR975ExIhoZYFNubZVDyIU6D2xXN7GK9RdnpEAz4nazMZ5p2USf7MhBTPRggMEe/zy73t/l/HccuTu005F4Rg+ps/BZH7LJFMGbfI6C+et62kJ8S4YdM7RbWdgjsH0jUkvojO6fV5LL9PLMzixHZpKlw2Nf40SLcszNGz1JuP8u+ORk/46hHZflqFKBWsnbXxYF1WdYal1vazw7w9vjH6uFJzOM00SgnGtAvkAPkxsJEdV+JRq/WP0y+NwW29PYyYJ/ftycVMoSt6a/9wBqb+2Ah04UqYvBAkclM6NUwD/H5yaButNDqYeVaEFAumfXHv3EtnszyHapD+bOz9d/sYW+Vqa9yVjL84A1zivoffBln46mVOs9G7ttUgbFEcpS/W7RV3BwFuqx+oviETUhQdjMoFNul33WEn5zO4/sT7ixnmmyELBuZWGrg+cxkGIzWiXqB5h8n8cnZ+UhZ4pqM0L84wJ/QyyBodM0E6HCgo3U3qDV9O5KhR0vC+HVl73sjcn189yuNhmizkEkfbigh1caa9ubnRgINLtnowkDHI6hEOZR6LGydA/x4Z s/vSftKf LHWxQYArwjhcqVgTyQH40toQICx8YI9wO7fKAzSYxP9Bf5YxHMd6JEw+m5hCxFzbKjP9aPX9lFdCehZtIK/3giFHQX/NHD26CBN5fASaQ3qPRrG4BPyYjmENUz7MSZ7BgL1JduFdFlS0enN8PdGSCkFojS17eutO2X3E8bocOYTeXLxU9r/LNY8qIqFRAnqwbLDo/mMWfDAoKqn7+6DfyOuCMokzzg/ozCrkfklaqe4qe2r5y49Q7lMCA6ckdOTcuSgtTf6+38IObxYPw916mV1DEbWaNn3IPQ86Cjejs4/ICg22SHJU6oaBC3w3NGhopH97r2soWJ9Arc+z75EbXYDtgWfu0wtibS53Z6eFVj+pFgJSkFAFrnjVeQhOr7co/ftLuoJehP+4CoH7l4uiEDksto1Ap6503gmfFECRLzo6WKlE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This script finds and suggests conversions of timeout patterns that result in seconds-denominated timeouts to use the new secs_to_jiffies() API in include/linux/jiffies.h for better readability. Suggested-by: Anna-Maria Behnsen Signed-off-by: Easwar Hariharan --- scripts/coccinelle/misc/secs_to_jiffies.cocci | 22 ++++++++++++++++++++++ 1 file changed, 22 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..8bbb2884ea5db939c63fd4513cf5ca8c977aa8cb --- /dev/null +++ b/scripts/coccinelle/misc/secs_to_jiffies.cocci @@ -0,0 +1,22 @@ +// 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 +// + +virtual patch + +@depends on patch@ constant C; @@ + +- msecs_to_jiffies(C * 1000) ++ secs_to_jiffies(C) + +@depends on patch@ constant C; @@ + +- msecs_to_jiffies(C * MSEC_PER_SEC) ++ secs_to_jiffies(C) From patchwork Tue Dec 10 22:02: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: 13902169 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD04BE77182 for ; Tue, 10 Dec 2024 22:02:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C13666B008C; Tue, 10 Dec 2024 17:02:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B26286B0093; Tue, 10 Dec 2024 17:02:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92A436B0098; Tue, 10 Dec 2024 17:02:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 749E46B008C for ; Tue, 10 Dec 2024 17:02:42 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 27497160BBC for ; Tue, 10 Dec 2024 22:02:42 +0000 (UTC) X-FDA: 82880424312.02.D921C33 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf21.hostedemail.com (Postfix) with ESMTP id BE7BE1C0011 for ; Tue, 10 Dec 2024 22:01:57 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=qVCIV9cf; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf21.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868149; a=rsa-sha256; cv=none; b=RqarTC0lZLMxncQw3IdfzyD5gXb/eFq7lWv8OhmoJJA8A7XSF2Rvw3fosY1QGU2JPlFOnD agtTXRUWzA4pt/ml9//Zz8mz3ZtSqIk1hbIll5qnUQmp57vNHMGDIab9P4U4K7Pfz1zQKx +5XjQ7wwecmUOIhk4OL4n7HwuWQnYbY= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=qVCIV9cf; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf21.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868149; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=c41QzYd4hhSXlS6Xp2pgWqH2EB3T3v3i9Pb37cjnO/o=; b=knHxDNjjxIKQy6VX/4BlHhqt5Us8tEQCXNFZYmAuID8aaUP48neaKzeXtovuxe4D9Q/PJv GiWtMUO+2BpAan3t81DU3a7TdYFbXfPcKGrXMFnO34qw6s9Puz7MeH+eubS72Ov41mh2Wd ghHHNKe/s3Al4KjQoIPkntqu2Z+uU44= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id E562F204722A; Tue, 10 Dec 2024 14:02:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E562F204722A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868157; bh=c41QzYd4hhSXlS6Xp2pgWqH2EB3T3v3i9Pb37cjnO/o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=qVCIV9cfYQFUEbAPN5oHTbVOOCMPtJTRnplX1niaLB3lEuL2MM5F44Gr4RM6lOTTS WXCIz2JA6aYjhurN56TEZJEQV0OG8AVSPHDGlGJRGWabTGSgGWE+1I7d1M8c078PhJ k5GeR3RvYMN/zDxLHn2xchQHWB1a1MyycuJ1TrJU= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:34 +0000 Subject: [PATCH v3 03/19] arm: pxa: Convert timeouts to use secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-3-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: BE7BE1C0011 X-Stat-Signature: u8kj7jbisgq5d7pwin3jbjc88kqajrj7 X-HE-Tag: 1733868117-246774 X-HE-Meta: U2FsdGVkX196i11ubz3Zz67s46oShVMBwOnBLrHSnH4RtC5w6xytS92v5kkWCPuWIKAdCUcGdexpkJxwJxPs+zTfnMR5klOJ9NVG8FUuDaw1T2PejWkgLNG+5wKCySK500Dod0fGom7drLk9AimjSMNyEyqymcSLmxmzthJkAJTsSIjUncen2JXxDUa3EkwcLqnJL5pHG4HajNPGz6ive8SDus3pWP0aumJfPNmQiDveBMdB97FmVwelAGxJEM0UHFQZHkOQvzFCAs0uRR40m67u92L3cXG7zSnZR3hxSiC7DxqaRyM9l+j9YGvgvvvDX0DEBzZIMnWgF8XeK9NE93KHxe4h62Ca0o11UNYoeg9xGbuIjqmOsbfh0EtxFhGYa5v4m0v95ESMLSx5vF/9E5V8AfQ6w2dDisCIteM64AVdfyJb0tXXilcnuYHH3Sx6yiXe3uI9DjFDCOUgGKOZ4dWqBADDxmOTHbDjl82p7aTUR49eAkimicyhTaMzPAKC380ov0u4xq0DJcEOaNiVhX3ajX0e1RLHACrflEODcY+reBLlSUwLLdV30lXU/7ZjljotH79rJIJEoLoAHhO2+/vyk/RW3g1h30F6kKpWFPSUfMVQgqHrUGIWd/WtX3O9UxxPAuAYXSob9GTBrylGbamVVGHL43ESQs4XBDZ5KyUBTiXEBYUj69DyYYpTVwTDFoEH2V8WZGe7iOUpaSg/Qa3uFoLvvkwEtdrKbpIOcK176AJd/kKf27ZYLRq0SMmEGw9BBAt3mvnOkeVeb3HABOVaClCIL/nR8bh4I0CFjigATmUPeXAuJjmbRKTlHvZCgcBfGZO2B1B3TVaTiRccKOl/ljEcSEIjibmGESt9rfWLk7cInVhBo+2o6MAngyMZm90UPZfWYn0Eb5qzvswjdPAuZtAQuzcfjKR1L8y0QqUXVJD8nEAmxY822ppAaOzo+yCcPELoeM8OpDycXfI nuyFAs9s keIWDl3oq8zEwYmVXV0Z/udpbvRpuL6thuqvX/7xCfWJ8JSyoA6/uz8a4RsPSoeMLYe6vHypLRStfYpNkOuJiyg3qw9WxB4fERIYCG5COj5KwkncGAiwryVkXX9sdSaqiMAQZk6sjCGttlnqJRk+SoEAxixR3Xyq54c7ZTvk9VbV+nIlGYJZdEIfhwQ9y6SygpQAP0zxQUsitvCLiZrQ2zoALwFo8VMz8ZJI2RwLw1YAQgebH2/021Gk73PfLQGEuhiP/2opFFW3AOV7kMnO9FexLuUdSlewZyLUSpSqrrH/G73jGdhEIZI6fTb4vZSPYjAzx6oLn2uItJNviZsa7HLnyYWvGhoLcimMSitP22Xgb+XLoORXpRZ/8/PKxK5zC2B2fjQYMgxxDgcNhnpXCilgBlcYyzIP31lDT8MAcN/D3OVs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 0c8d9000df5a6384d615cf231ff986c0c6b71681..dd930e3a61a493293597815782d2ffd36605a700 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -31,10 +31,10 @@ /* * 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_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ +#define SHARPSL_CHARGE_ON_TIME_INTERVAL (secs_to_jiffies(60)) +#define SHARPSL_CHARGE_FINISH_TIME (secs_to_jiffies(10*60)) +#define SHARPSL_BATCHK_TIME (secs_to_jiffies(15)) +#define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ #define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */ #define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */ From patchwork Tue Dec 10 22:02: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: 13902170 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 867F5E77192 for ; Tue, 10 Dec 2024 22:02:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 498316B0099; Tue, 10 Dec 2024 17:02:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3FC506B0093; Tue, 10 Dec 2024 17:02:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2280E6B009F; Tue, 10 Dec 2024 17:02:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E1A396B0098 for ; Tue, 10 Dec 2024 17:02:42 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 63DF3120F4F for ; Tue, 10 Dec 2024 22:02:42 +0000 (UTC) X-FDA: 82880424018.15.424D78E Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf29.hostedemail.com (Postfix) with ESMTP id 5FA8F120005 for ; Tue, 10 Dec 2024 22:02:09 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=Cha0cDHP; spf=pass (imf29.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868137; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=q4DaHZqCWeIKQe7TTG2rV3K7PdI1M/As9LhjCxxNuts=; b=JI0e7AkM8gMoVnR4HW24I+ihR5ApWe9ukwqRqrXKzstJLwufcBFxRhKFHo3CDWc/n+UNRT 5EONe46uHD6yZ8lSOsuOYtKFZwAdexadHRqeKfrvTjar1iedLL6PzfOVr868dMI6n3CTRN Ubhu4HDh1EB9+h97tdere0vDs1HuImw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868137; a=rsa-sha256; cv=none; b=KBmbQhdG3rO3g2jsbNytzqBpEyCoRO71XMFTJjltPk1VNf5hqBtbmVQ/viV2/YMK1HRRy7 Siuw0QHMz/hVU+3cmEkjleyDts8Bs2cqnPdfLXRc7kcshyGQ7H1QW/khZryGdZvrfdaQHh 5ZcjnHY4Vz0f3BaTWjIyhBtImdkQnQU= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=Cha0cDHP; spf=pass (imf29.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 1CDB6204722B; Tue, 10 Dec 2024 14:02:37 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1CDB6204722B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868157; bh=q4DaHZqCWeIKQe7TTG2rV3K7PdI1M/As9LhjCxxNuts=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Cha0cDHP2vqeI8GSgKLIifsRbCjhIP9dfadMSDrPMIXzCzmN2lfENv6VOGo3TWGGc RhOk4eEHD3feUGZkxL7/wUYX3ev+tB6zBroy0qt0RlqU7ha1EGeg6x38R1w2x8kfbl wuStr/zn04e6xBcfNPjBsiQEchSCZugge2XzJeQs= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:35 +0000 Subject: [PATCH v3 04/19] s390: kernel: Convert timeouts to use secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-4-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Queue-Id: 5FA8F120005 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: bqwwcsz5qmqdb9uihajng6s3g711rp8d X-HE-Tag: 1733868129-644322 X-HE-Meta: U2FsdGVkX1+0rqchtS432dktsrGNk3KPlcyTY2wo9NW9h1vUJ5fK5aUiYMClyRNuG8xITmcCnuhugdMkYnsaxfruXm3/VPb/NGpP5cv7jGe1nfeVsHlTqdI8p0nK/km5nfqe1RYDXZvSYiaXbH9w/LT+mdE8IxYwo8LXxjx5mxkAEzGzXfOfvwtMi23V7xpwoxhCSjE3hjxMumsYDE/aiQ0pWoXfuLAHuVuze9EAqRTkCLakMRK7mR00Q+mXq6PxeE2siGlbcTr4ab/XHO9ZBfU7KOWmEkfwdl8PgR3P1b6gKsgE32s8fBFKZ3uRHODqQwhh9dwjJbVdzBne5KmRYrfHvKagAFLL2w9r+AxUWCddkqZTEDDJVYKVisNjRmKb9GVMYSsExcUH4RdT6crzsUi+rSxSZAGPOIIyD2xVW/h2rPeIOCnIr+zatxAc9P/2sm3+Si9mi0ghtxSstN6Nr6Xx2ezPHHBDaKHn0sy6gyKMMgPQzoJeXFlautMc7FjPG9GG3qU9wiTwZmOPWpGb138thdkLS5RIPDyKHK9NNYzqmH85APihVzpLYL00AthpVx8nhnGnjC22fQFaSvnCtpkGCaMs2jafAokeCRZ0WYPjjyoJj4IEiYmG222dII1/rt4v8qqczFvLQmdipg9n8V0Wvq+jk9KtQD+aR9lUper8jAXAT62eBI7kbg1ZF+WkpsHdg8TBzlSEjkNn6c5e8tPLB0R72KhQKq2+kuTkWmb8z2xNAiQlpjYAgXOb2tGg2Bhd8xlk23y0ISepGuTBGZL484HyFSFMHHV5bPjV+RaR10tHRC0uEt7rUFYhCINBOX/V8s2fmv8PdwEnRsoQ+frEGVD4toCUfJtVohgFzmros3YimxIAGOCmROGHCp8ZowHXZsyXUWe4Lg1BOrEXZlrjD1jazsrC+ISGdZHZNq2f5IRxl9CBfBpMxrtzTGzsAcgHR5jZCVv0EkHHzvn SfYm7OzS KX80FGFVowDjGH/ZCnnXcxt0lrTxET4j6gYvjvIp3fIdX+c2wkkg9ifHuKZVyHnKRtSOBepbJi8aIXNA98kIuoes0PS1itKPY9xtl4ETqZtlfREhL3in7/sj8vOihcy7Ou0ju+Ksk52641KOZZ4gxYC0ctAkEUiWYXJt4yY98GoFsDbtmItumLM5yVWqdhmq7RDj4zfzzLTtIm3CDaoAOIMUOWF9rSs8cBWJCszow4fL1yZ+uxchlT4I2BXmPRjIXUBeV9mXauqIdne6vsdoyYyuMoKkFtZlUT3A8BNm234Sn0DiYd7VgTlu3zv9cEN94URzBRIxT31AsHqr+SBrMd59A4I509ZkiFa0Lxag68QnWdbBHmf4bDha0+awCtslgA4+o27Ae5UZcf56O7X6WpjtakRv8JGrmIa3OJEu1Fk0sPN4= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the values here are a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 | 2 +- arch/s390/kernel/time.c | 4 ++-- arch/s390/kernel/topology.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/s390/kernel/lgr.c b/arch/s390/kernel/lgr.c index 6652e54cf3db9fbdd8cfb06f8a0dc1d4c05ae7d7..6d1ffca5f798086160112990cb947ec8deed0659 100644 --- a/arch/s390/kernel/lgr.c +++ b/arch/s390/kernel/lgr.c @@ -166,7 +166,7 @@ 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 34a65c141ea076ba97b3238f1f36f077b15961df..e9f47c3a61978a45c72aee23bc44dcb128113c8c 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -662,12 +662,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 4f9c301a705b63f8dd0e7bc33e7206ad1222e7a7..0fd56a1cadbd4f41a9876a3a3fec7f5dc08ac2db 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c @@ -371,7 +371,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 Tue Dec 10 22:02: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: 13902171 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A86B0E77182 for ; Tue, 10 Dec 2024 22:02:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6BF396B0093; Tue, 10 Dec 2024 17:02:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 64BF76B00A0; Tue, 10 Dec 2024 17:02:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3338C6B0098; Tue, 10 Dec 2024 17:02:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E5AC06B0099 for ; Tue, 10 Dec 2024 17:02:42 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A132DA0FA9 for ; Tue, 10 Dec 2024 22:02:42 +0000 (UTC) X-FDA: 82880423850.23.181866C Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf28.hostedemail.com (Postfix) with ESMTP id 46AB5C0014 for ; Tue, 10 Dec 2024 22:02:15 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=ey2u4hFu; spf=pass (imf28.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868146; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pNf1urZZ7beXITMyG6cNpTQM4ujE/reyCjI7dxR8TrA=; b=5y/YaozN33RdTkN9Thk/y6jqFr0ekYZ1QS5kLBOys+pVbnxp8rmgAWa0GRZ3IWXr/MUxz4 hTlcdfWUPL2YP6AR/4IEfrGVdoeainUoLgANUCuCFnuJUKRhMIJuv8nvduAFXVsByKUBQB eSPZE++67SGRh2/4qh0iEoYRk8grIww= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868146; a=rsa-sha256; cv=none; b=cdIscqkZHtQCRr9Iy5uhTTpUF0fUxsF1H5C81dK4fznsnGghXYBNSQMtQWGlvGZPPEt3QJ cw/8qB8a7oXsbMSbomAUwSEKboNxNZcnmGGwRWPZDzqp6J84zO62QKRo4jaZNLxLQs/gxE aA7BkIOM9gPJopZgPGoGrMqqBg4kF4Y= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=ey2u4hFu; spf=pass (imf28.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 4B3EA204722C; Tue, 10 Dec 2024 14:02:37 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4B3EA204722C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868157; bh=pNf1urZZ7beXITMyG6cNpTQM4ujE/reyCjI7dxR8TrA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ey2u4hFur56upsg36Bzzf5E6sp9TxIQJWauHtVHyZKWxl2TYAXbOMES9gB/LrtTHt EMIcdvfnDr4nFfA+fPKgnRb6wrIZBNFQYmxUUa3IOMgJ6rbLPy51pP+s0wIlgpVbyY W7PI6jGCodUt7pK+WAXoxoZrhQg9ZJ/5kGvj+4iw= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:36 +0000 Subject: [PATCH v3 05/19] powerpc/papr_scm: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-5-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 46AB5C0014 X-Stat-Signature: ny1w71gtoaxqxzu98fsuzd7s15owcocn X-Rspam-User: X-HE-Tag: 1733868135-770157 X-HE-Meta: U2FsdGVkX18ZipvSOC+CUnCVGkzshZM0NwBfz+kqpIvQtwuVh+YnhoYHq/DwbVCb6E2aq8EC8e2AigTSd81IIAwd809JigSSGqIoh1XOmsectXLkQM3YXRL+U91yC8pGSyy+nBQtTGfpcRSCBrWv4UYa0ytpP3R/piuWIQOssmCZzTXR+6wJi9AF+ftxV6qd2tVS8L8HN9mu7POi2YH5C0IKtORADHv0Luz5/ku4jqnb+ZGdY2khGWRQw7RvhlqT3lg1XKO2lrFddzn26lHGngXt+j6JjIlmTdNRpNKQJEL2cIBLa2K2T/C0I4Im2uBFk6t7I43GVO/OpqCFyU+skTvqdsaE4IRF+2i8j26vq4JZjtYg4VPbR3lQHJ8G9CCBdGdomnGKqq41uUyrypDJ83Zm/VapdoUKo4cyoKYpn87QdMROJ4VPPQhNCHveHcnMUnb68rOdQ5TDRQNenf65zPwdAJPfiWtlWEVuNjW6zhueO714uCs1cjI9xC41Em2fr2NPSTiLBt7l640EsXtfDhHHO1sOW98IsN0/jxXY+U00MZj7pmYywyNqG7ONqEToHuW5vEleCeB0mg12pZKTHLY1U3j8z3rAAyNypBOLIWsn4diASz/0svsFXOZMPAldTB2o9tJj1nbeGwmR1KzIvrHrqA+5muGNGQasIpSUAxj5fYngM8t8wyMsGF6VCoVahJG8wz6g+JnT9TGgra1j9iT8aSaAMFmg+3ZLmkK3ulXAMAS9e3aTeYzza7haRGQrFjOgcCjSuSDJbHOfWOGZVXxNnlJrFCzVbMrHFU4xHeFaowscJUIHp45fsTshnCOnlLC5GYaE7tWF9JuXzPNSjly1Q2kn0PnQKAASfzheYizYXBPu/ksLMqOCxaN1/ueEkr4H5wVI8496jcwUvgwz1I339TKKuApdO/S2hjLf0f6Q6LECRFaBa/VNS5Vktd17ydt5FXSHLZu62JRsmVb L3y18F7y 2YKlOVXT3ryqRLxgmJoFex9N4O8vX0iNgDc5o60KJgGm8J7MvKrPvWywZy+F7JTTzH86UeiMukdnyjGVKKos51Ji9yZBIoM/dK5k/s/omAZVnA3G7Ra1A8mg1oOXcKghWGrTUd4KXRO0gZ2qTiwR2QK/ht8yDtRVU4pE606N2W4HXuf2hQ3msZOpR6mMuvZzClFu4cdHm8qnjdg8Ta7xFKzOKcSSLcFTEJDxKTJmpAFIzL0E0ID9V9jr4cO3fpJrRknOHAT+dnqX+r3TiVF064xAecOvRiGGDtd9h8Bf5Tvcppj/u/JhDcveGRiPZYe8EwymtxGlibyByVAjrscYdGAv2bfI5W0XJAOzZLNUTWWvORYmPs/oP4RGvGBVWGBncqk5I4Zynt5YX/Z/Yqu2Xm1BLQfnHXfKj9JCb4bl6r06l1yk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 Reviewed-by: Christophe Leroy --- 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 f84ac9fbe203c111046464b9100866dddae687bb..f7c9271bda58433f395648063e60409a8d3c11d9 100644 --- a/arch/powerpc/platforms/pseries/papr_scm.c +++ b/arch/powerpc/platforms/pseries/papr_scm.c @@ -544,7 +544,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 Tue Dec 10 22:02: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: 13902172 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7EECE77198 for ; Tue, 10 Dec 2024 22:02:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 02FE56B0098; Tue, 10 Dec 2024 17:02:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E82836B00A0; Tue, 10 Dec 2024 17:02:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C5F836B00A1; Tue, 10 Dec 2024 17:02:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A23056B0098 for ; Tue, 10 Dec 2024 17:02:43 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 575A6140BC3 for ; Tue, 10 Dec 2024 22:02:43 +0000 (UTC) X-FDA: 82880423724.07.E9420B2 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf08.hostedemail.com (Postfix) with ESMTP id AFAA1160011 for ; Tue, 10 Dec 2024 22:02:26 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=YCfQzuzz; spf=pass (imf08.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868140; a=rsa-sha256; cv=none; b=pfI8Pj3K+d3uZr+3tZ3hj9qjvm4J5hISaKfZcgRP1Sqr2S1fsI4iUCMwfVUxNSvh6vXaBY 1A40/tKPgAPtgJ1roelAzBzfPEAcpuaWn/rJQQkBvA3XcMAWl7ZzfxGv0M65XV88QJ9rdQ EPN1z+iuvQHD266gWDe3l6x7ADqf9RU= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=YCfQzuzz; spf=pass (imf08.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868140; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=0JE1mCMNDTStNy3f4QrS8yzg/qXwB8sbyOMa5sLnc+M=; b=XQTKFOS+tG2a/Ew8xmbcYLOCrjsaJI62Kzg/3KP/2iPZ2Kj3dvlqlj9uFcKAF7YPhK42J4 ONflVakgqhYC2i5q7xsY7BAZ0/wZKzPDewhfS+00kiA8rKyNVnoUy5ZQYZuImAU52tmPF8 1X1eq1ePmJ8oR5YrLX2wTyDx7Bf65G4= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 7A91220BCAD0; Tue, 10 Dec 2024 14:02:37 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7A91220BCAD0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868157; bh=0JE1mCMNDTStNy3f4QrS8yzg/qXwB8sbyOMa5sLnc+M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=YCfQzuzz84XSOxCFulDwBJMyeJsDcssJlAQbcNcDqVlVY42CJOIL+UK9ammaKlGe+ y0+S9QnHRdg/p6H9mSyPRo+qXk+3dcsFcITb9kFGHGdUIwdzitxdUdxS6Zxb9FQSzr 04JqDqdWTuFBsk1ZmtqL88EM/bwJOE39+Tw6Eck4= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:37 +0000 Subject: [PATCH v3 06/19] mm: kmemleak: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-6-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Queue-Id: AFAA1160011 X-Stat-Signature: e7pzcg1by48d4arb8wiqresn4n84mmcg X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1733868146-393504 X-HE-Meta: U2FsdGVkX18oF6mU/PPLBpEX0752qezQfXFOEvIQZ0slK8Lu6QIp5Kp8qwmDcXhCeGxLds200QCwbjGuKxMhu2dFC/k4JXiQ8ETYD9hSM9E62Sk2zcqicM/XQv9xOu0Nmqjm3OlhlKA+jYXOsVjiNTs2e6etn43gf93g/7f75HS+/DJ+pS7LTgN2mU3jKfsQiV+e1wfS2Eu7pN6U8yhbUnXQyGp3V8IVoAKvymqOkhrT1yIHzAUz1NAmHsGk2ta+gA4pllHSpnyx/1DYcZrjUrzzyH3vSrR1H4YorTG7WheHF4WsNemufDKjtGQFVcVkzzFLU1DPep85BsFKGbvH7kdxLgLHBtPY87IVg8HknZRVF4WZ0lzxO/Y44P02m/WSmhDQ+TUUvT80Ji1sMqhvIGAN4pQxdZ/L7w/paAbPFGaC/jFPfSjGL+YP6WKxzKbzTlsFu0wP7b5TCkAjGfESIgAoKditQlvm06OBXpFPChzMVRNBZdDNrhbW207Q8AHOlGndnYdYQTsO6rIz7Rjun1hlFeIfaCY7Cgem9dYoUydyqp8Sv/eLS/3+m/58yADPzZk1ThHmSYfM9Z6s80qYzhPB/g/4sDPF1n8xX8Pn0DG6MTcgnRCZNOtlC9k9Dr4D61YfC6tnyg/CFqTgrsJe0/ob1TH+Ddlw1hpTDClMj1SDVrtYlUaTu2pCQ+rV+3h0rhtEooud6oTsd2eB0TbsjxdjwfSz1XtW4eFAtQzl8kcTIdZ4iMtsBAxtCrvaYMacnZs1E+z72WC3ym46VG5YhP+4QVqhujftkh+uts4sMFtFrPfaCrCvquBaS4Qzmg3r40M6ryloKRXH99cUc2S/EHLqycKnX0dLVsSYNW3VyEqie/v4NL6LxU/h6ONThVKapVolvgK1Y4CANmA7s7QeuZpfdazrcznLgeiMRAFcGP/JbgHZQWcS4ux2SJGLR3dWKtUu700VLN+I2JjEEjZ KDczxloY fZDxPOuqGfPO57Us47vjRePh+M3awghGaiaZK5yY4oBqJoqzaEV2RLMHodA6jA83x8MiXaaBYm4YdD2bvL3e8vbJL6+y/xD7Dmo9IpgKpThuORUSyzeEQ1Woi2sFksgQYKwBA2YwnidHHaxIdh5xXuTTOiwVzIPHZAzqQ5Puc9Kg5vI0bUSCPFaHOE2wbeRsXcueRS+8wVL338ldxMA3cRET0cBOCnyOw8p7K8YmKV0i7y2mlXP5wpFlVvmigitv1wLfMAjVaSHj6RlEM0eWYxydg+/5hnXcjMq7t/4zQ7gnBn11Ay3xhIpOBgaJ5kSQj1mQ2ZK65LlW4zOtermtnzL5KFE4RSDJK81G9jn0zvV3cB5JNbnwchs6A4PqJpb/U0VjsBa9DgpJjgW3TSAX9O1v0RuDdZdQS27JuDU4f9UhLLbc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 2a945c07ae99525815c8fb733e8eb1b4da60668e..a2ded75cc0c03838bc048c82990c8524f25549b6 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1855,7 +1855,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); @@ -2241,7 +2241,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 Tue Dec 10 22:02: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: 13902173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78420E77192 for ; Tue, 10 Dec 2024 22:02:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 587886B009A; Tue, 10 Dec 2024 17:02:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4E4A56B00A0; Tue, 10 Dec 2024 17:02:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E71D6B00A2; Tue, 10 Dec 2024 17:02:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id F1B716B00A1 for ; Tue, 10 Dec 2024 17:02:43 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id AD96AAEDEB for ; Tue, 10 Dec 2024 22:02:43 +0000 (UTC) X-FDA: 82880423934.10.2BA7DF3 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf06.hostedemail.com (Postfix) with ESMTP id 4232318000E for ; Tue, 10 Dec 2024 22:02:26 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=k1q7WXOx; spf=pass (imf06.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868151; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WjXR/e+Bt5J36pfaIEwWXUE8wYei/ElgtSssYeLrLS0=; b=DNugCAQnmuHaxgdpY65k8tBTnRW+1uxRS9YOY2NJLSTfzu1cSngciQTf1RRrpkbVfbOrw8 u6V/UJu5t26mkGY9btwv/3ed7NjPVZmDAMi2tTmnQZCYxNQxnQdkY9h2AhSTxKc0vQ55ml ms9boVgWIIo/sTeHiyFWk0cHtTjgqCI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868151; a=rsa-sha256; cv=none; b=jiYKh1EhXngoKwnhTkXLs3rQrrQSTgvjtbQEJbu/wv1mFnBPq3tJkz0jlrEHmdwq7ppuyB kbfMaiUW5G6kLUa7R3/uIjk5dTTESR2MGMrGXhi1LkHWmr01wCCSv2LbAlGfJwGTG1w07S 0tQAsE/J9joZAnfKhRNr5CWejQzZ3Xs= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=k1q7WXOx; spf=pass (imf06.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id A7DE320BCAEA; Tue, 10 Dec 2024 14:02:37 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A7DE320BCAEA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868157; bh=WjXR/e+Bt5J36pfaIEwWXUE8wYei/ElgtSssYeLrLS0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=k1q7WXOxk1qYLVn196G3sb8s3XVjdPiH9giyU/vMWpK4NQiBox8ErAeTFxnenHayv 1NLSp5g4CPg/qfYp440BlKTVCcToWDafQQXFfUYhXGaNJP4LCGPckmvvkPFrzQ2ykv 8WoFkMMhJxjwt/2RQ+Oo6g69AunqDN5xYmAoTPZY= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:38 +0000 Subject: [PATCH v3 07/19] accel/habanalabs: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-7-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 4232318000E X-Stat-Signature: kxq465ndf1tih6hrenuihjzn3jesnefk X-Rspam-User: X-HE-Tag: 1733868146-895348 X-HE-Meta: U2FsdGVkX18gi0HNdyIrJP4sDJtv6WPCUCtsEjGnd3SmKPuGHqZ+D2Cpr/4WUx8jjSN+uFjvmUY/24qo3IjMhUoCunVlyAF7+RelZABqCyKXq6Y3xWJbuGzdRyX5UREOmZLXIOi71OAvkmxb8l1JgzaOyKF2u4xEWlnCL6OED4pw1vY2B4/UJBg8g6GfqhGUiqZCusBIHhO7cbXoGidi/XAfZ46MfTekKGrzBWj5ZC6VdFyk5W7AxD9ptxuFYkopu0hj80FsfMlcjgAGnOjnv/QgsqIFIJFNGLbG6GrHThryThTTHa4kJEbRHuG/evjsj2kGk6/GnKYsFz/rB8SEbuIFG4swbJZDNco6zsEW7yiI7j+0pkC7m9o5ETbeUJGj0nXYukEXtK6WtxlVRYWJbYOwpR2HR5Gbts7G2nkiihU0Nnj8hJ+SQAU+dEoHcIpF6+IfB9ZCtRfEwdf8R+A60wGtvKnIwQ/escE3G+89LMda4PyLj8KwInVDbkDq7q3WJ7kD/QgvWqagy85PEeBOr+Aqfgetu2tgFxjZSdyBS4aNO8ABN7REI6k7RfGqPAV3HMxYk+8fk7QVJctzeysnZxerkYMhQuzeJTqPJlntNq8EcwOkCDaaYj8o07iqmu8WvX4pQOtQ78IbMulEpOCjmxiPZ9IqJ8gn8v3ytu5c20b/4Xxr+xQOLS9hwLYWvjnEt9R7GytER05voz5pZag7qBeWnl94Prc8zR+pvQsMBcC4qcfSCFCwWdGOUKBkF2lVMX0rMj5OSQBzYRnz0OS0UOjczzg4gLuVVvBWA8pjHY+NoDHNCHNZLByVt19YB9aNOxa5be0pjEzLYEZKOvN2Pej8l7jsnFIAv+UKaPB1E/CtdYAppwCtS22PQia5EvzITvoRnl6svt6HV5gMrqcvhLOC+GDqqeZ/Rf4wmDzm71CkYPej4vU4TZttN9iQ8zfVj1z4V+pX9suFBMRv2Si U0D1ZzWo +RntD1kDBb58rdZITTV/QzBItx2nbXsUePqie8tAS83wrPtxObiIy29Hfgcs4wuXuBrb2lIUYSxHRDCqGJGlZmiNm01B9iklc7miV23mUkKq7n78ADzsnzed+V4gybuwfqxlM1VBjJKx8Q5bAdWAFK9JNR+KlNlRCDnaj45Ke/wSDtTzSsz0fVbqJgslqr52zpr97n7iy5Za/y17PqEwP8mq91CVmrv4tBW09HreVbb+qUVYL8I9qvHuLnG1lQr1/s5md9XusKppWEL49jjzGrCemRjh9Lebku5VXKOPFAVVZRgEf6wbvbkkliUmrBNK/zfEyCFSP+M/aL1o5HnQapqiBs0XgjwR74H6M53+gKmpz+cipIuA8U7PIPg6V0/2Vo8QC/c4ogWTto5xkxFXe3DtQjEEI3rZ5CbNuzZuGiNSkZ8w= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 5409b2c656c803f6d172dd882711357061f30022..596c52e8aa266bf48e2be45e719adb202604577b 100644 --- a/drivers/accel/habanalabs/common/habanalabs_drv.c +++ b/drivers/accel/habanalabs/common/habanalabs_drv.c @@ -361,8 +361,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 Tue Dec 10 22:02:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13902174 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 448F7E77182 for ; Tue, 10 Dec 2024 22:03:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 423B06B00A0; Tue, 10 Dec 2024 17:02:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AB426B00A1; Tue, 10 Dec 2024 17:02:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D8FB6B00A4; Tue, 10 Dec 2024 17:02:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id F08D06B00A1 for ; Tue, 10 Dec 2024 17:02:44 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 9072B140BC5 for ; Tue, 10 Dec 2024 22:02:44 +0000 (UTC) X-FDA: 82880424228.16.2A72531 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf12.hostedemail.com (Postfix) with ESMTP id 0C4314001C for ; Tue, 10 Dec 2024 22:02:32 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=IIAWMyJ8; spf=pass (imf12.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868152; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=DhJBfAD2d6ET0f+MR7PDWaX6CpgYhpsGb+RQrMGIOAY=; b=RxmOuGprg32FjPGtDiN67eklh606852tcbMM3lZr5DTHU2Fta38CjE2Aq/zE+STYjif+fq 2sCjRl0sCyRn0xefCL19f5pCcOWLR7fvbHOSm5fU7zA4CGetIfb0FlOtSiEu4WvOVui+2Z nmTy3WX/Uc49DdJj/67ok16Hl6NlYGg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868152; a=rsa-sha256; cv=none; b=zSuFpTxz9+VpN8ksGcPAvzIBD8x69kkw9agzWRzWDp/z4enunWhC/pWV8Bp8diFldnVii3 rRtlMFCjZXP2YvXBEtqwdk6k+KLjLnEnNl02KquFDKOFpj7KehAqPoQ2qaECAp/pchtclj 7J/xr+ZyIE+VM2bZoEQIDEeXqon5hS0= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=IIAWMyJ8; spf=pass (imf12.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id D4E6A204722D; Tue, 10 Dec 2024 14:02:37 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D4E6A204722D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868158; bh=DhJBfAD2d6ET0f+MR7PDWaX6CpgYhpsGb+RQrMGIOAY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IIAWMyJ8NzQC8a9Pk8dz0U3jdNgu9NGd3SiawGSbAFHI2lBJj9kVVY+Jrn6mOAaem Wm2Q0riPqkUNNLsJAJDVn84Us2zbSxk2FObucA7BvA+Ci0Obga6BtVUEDHD7pm4PpM tPAQA1jtOYji99byX6HP0p2SzC0hDQD6638LF7MQ= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:39 +0000 Subject: [PATCH v3 08/19] drm/xe: Convert timeout to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-8-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 0C4314001C X-Stat-Signature: bjh4ikebhdsfn1mp9fo4m4mzxyrwqqc9 X-Rspam-User: X-HE-Tag: 1733868152-876182 X-HE-Meta: U2FsdGVkX1+E3J8mnbE8T9DqYzprBJ7MWfSUNMey43sAA7sNeqJXYfqdnZdu8KP6GKcjQHkVB8lC4d27oNeNKz1j/+py0Oo+W6IQRTZy0hxFDTpKUT7yKeEZh8ZlHEYabpZqZxLTzT8xwKaREQDmrzuNpV0nWkZJ2bf1uJ7eKkymrsGN4ar7lU6+PYjqeUNJ6uVJdAhtezW9a5b8ow96jCT2iZPvLfpW7WJ81CoqYN+C+ahAf48S/7sC0iiNLo74kCa93ydXRdVtIXNQzoNNYxvAG1zybezgxs/YuiBEXRrvIXIZaXDhS5vLE/Virr7tVr2oS0nJCKqKmV11TtruAoyZF4AD9KJaFbKRIZwu/5dJH0rBr9NiRJxHyEL6MXEgOMPDrf2xDdFiZE/B8YiJV40UgR84Zv/8o4gao+Kg6vv4v6Dx/zGWsg98F0VqwnMDBfrTMhzBVm/EHEK/gTwlkI+1wgc8UXfWdGm70SIYNrGvHhXJwQ+pG+c8jEc2FUhboAbZn8D9f35no0v9QWY0OwDTGxwuMjRCpijhNSfOxEtGTSBya2ro644wPzZQ1Pe+qE2gieu0+x7j45XX/xOWoMSIzRoHhBTLQyYvHOCrFkJ3UPEVMy3iVEHh7lzLjyYuJnMZx2rC+WBFfzoaiwjKuDLCO1IzEcTclNRmmN8aK9xSOiGOYerdoh/7YI+D5TJwJvcDo7mfB+ep1tZtL6whYXCJirsQsSAFey1nx8fzMmgpRiHLR+MFOwvd9hqMTfKRUm+jClb4YNPgLHEBKdBWxxI9PHZRULnnFM1u5/o4kIGV55HjUAnrkN3RH7uYWfF1p2DCGWAlsmyrlYvZg6Qk9HDs74LMxilS5pWcJVQdnAvgzd+ZQtj91H36w69ajN26pYisT1ZlWKQpIWumZykXZQODReh5WJS8YHmxKN37IBQneYhK0sMql/EhoMDTzdrnEtimxshk8x+QwgxT5oa HgyLKJpU +TcsjulIwqSRahX4ljXBDv6F1nPxwahEKLy5CDU6KLUxgUJJi/PQoeij5gnWsT1/20LrX6XXF3pn+QdlbKDqv9FTlnhV6584FMbhM3cWjMe264BzTW/ug5Goq7MbBe9cm6nD542EQd0IUf3NkE30eSWToG6n0cO+kQnwGowMDZOU0+Vi37rniJrjBAUWSpgwSI8lk1YGlGS0pZaRDunUQvxhW59lPIgl4BGxv5wGURUgFua1CQQrcjVStR5eC/dxYSR7S3BzY+XMDN0W/BORJ+zDytKtFPlLFJSWfxg/uzK9VdEvhKbRb7rlgSPlXo3N47T/IPqwY6VXkj3SRrV9MVIcVK4ZY0h2kH4cNmwY3lIxysEe9hAKWLkV1jXJwyUfYBo3tsf+RnVlARmAtFU2X5IsR0n0q2QuB4oI2k5aul1i4C8AgEjHpqOlCj0299i5X3M8WLdO18mO0hrCrOpDwTJukNFFPZK+xq475 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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) Reviewed-by: Thomas Hellström 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 56d4ffb650dade8622cc25026a96155fa5572434..9093469a275f46f7bf58ff1049c1c9cc712cdd33 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -519,7 +519,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 Tue Dec 10 22:02: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: 13902176 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EE7FE77184 for ; Tue, 10 Dec 2024 22:03:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6C9F16B00A1; Tue, 10 Dec 2024 17:02:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5FDDF6B00A6; Tue, 10 Dec 2024 17:02:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 29CA16B00A2; Tue, 10 Dec 2024 17:02:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id E3F2A6B00A0 for ; Tue, 10 Dec 2024 17:02:44 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 90DD5160BBF for ; Tue, 10 Dec 2024 22:02:44 +0000 (UTC) X-FDA: 82880423808.13.8645F94 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf28.hostedemail.com (Postfix) with ESMTP id 3B549C000B for ; Tue, 10 Dec 2024 22:02:17 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=h7xNg+CJ; spf=pass (imf28.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868148; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4PsoF6SsPfbe/epEx07m/H71eMXFwTragWU3TWb95lc=; b=m6a5t0PjiYoNZZhjBz8aFHqcvd2l2zm3/sVIgmab/4nAfKGe5ChkSHP+MbNHu8EZ99GhOk AxevqIGvH6xqHd1VJYJ+CbztJ0bCQ3TF/TOehsxsRefzwSiQh6raOMMBmixDi7+7wAjSHY 4vBOv3B1YjHXPIm3pNm7jMKObzW8p3s= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868148; a=rsa-sha256; cv=none; b=hC2JVFKFXiKQobmxhCd26+ssj8dssT8UDHA4OKGXJNg9rSdxDWeqVJoXrPEkJYLxisFjbi C6Opn1QrohgMYhIh8Np2v4UeLTFb9UydgtEKySRpVCPm6Vh7Y6L7xGwC7O+Fo1klKFhJl2 dyFb/jAGB4MMih4333GTDlPc2hhaSlg= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=h7xNg+CJ; spf=pass (imf28.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 102E5204722E; Tue, 10 Dec 2024 14:02:38 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 102E5204722E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868158; bh=4PsoF6SsPfbe/epEx07m/H71eMXFwTragWU3TWb95lc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=h7xNg+CJMXTd5DQ9X3jMinLoN7vSFDg8Wc8ctVRvzEZXRU6zr2IuGvATvzcH5C5mv 8tZpWnxa3guMlnaHImjL8p97Vyif6Q4iPn6nrKcU0WRTq12Y7YJw/78q0d2IIYZwV/ HU4b3GuDdaH6l3YJ/3viq/heQZ5TTvrnm5sB3x44= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:40 +0000 Subject: [PATCH v3 09/19] scsi: lpfc: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-9-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 3B549C000B X-Stat-Signature: enp7eyrtiuw1edcsy9q1xp3ztm7xwazo X-Rspam-User: X-HE-Tag: 1733868137-102147 X-HE-Meta: U2FsdGVkX1/Mr3mD3z3GchPnDRZT6mr4BT/IOh2BIJp3NoBe8R6Y9BRXlTty9NOYRl8Rn7umaXsEPoAK3jn/hi7Bhx71Mr7g7lNMTmpV2pmPTFOmGVx5qVFuFUwi7rKxnZ7pV59Z0Mf4XV+s2SWJgqhtuHePzhmwytzZXvoEhchxVJwV9hHf95hdXljE76JIsveC6lyM4HZLoyvZjNDOwo23kJAAOcpUmj5aH9AF/teC9CGA2HKWdNDNDxhv4WsHogZzz/hqMye0Qc4FxQbooMEc4LcuA/m41gvt/K7IrrX3OsYiyUZHp/xr8+fi3XZcDPGZP8eAKmZeS0kgC2fheFcpbQBW8FhyLUr5Vg0duJ0MVLo9iP4AIuHDxd/1GEoK0d6tH54kwkoRsmtHgIajmdcVAJ5Dxj76rrfUa4aNPT9NZN+mgew0CiHo++llZ/ndQU52njb1NvgfbveORk9J59ARNY/63R3dVh+icq9PLpzXcC7HKrlauwTs1iSaBf6o5P7NJcOffSZKcMR+jibwAZUPMsgkev9Ie+AtYNbHY/45ZEeUscYhfSHVonzs57CGeUgj+pcF1DT1zke4s8DmE4S19YvDwA0JjmbB7DcmrVGnTDMcxIeIYvs5xZx9nOv4/Choon7JC3e/nPVlbHTbSMh/rpJmkMv+ix9wGM0xhvpJxOeSjfXtnhjoI+wZYQ5KUrR6OdCBcbCqH/vvut+MtUqC7I/ck3R2b9p7P3Rf3o6CxFTBJzZMDRb0hfHQhu+1jAOYPx1wj0IWBIw8OPLlynitm1RKVhMRHynWc3h+pYvNcoCms/6G3OpCd7OJfgv1kh2yQ8zV36IK/4DDC+P/EbzTmDkIkDkdCyL2R6EWs88VkSHa+wwOgzQDsWIhEVhWOtAC1GHvFx5sLHpGBVuqKBiNe67h+/181kiauYFYoPRppe8UZUSlHvLdss5+/i5uuMNuMIa9oMJ1ecZhW0q 5DR9VT2j ypUXLaR2npINMPww8fDYpk4h1se2bR1OGjBA8TAzgi+hPW0RSpWPW7xvqCvWmuq8yQg9Dv6ZHuCGkoNKjC7Y2Ev18qgAt+SdOfo79kJM8dbmEedcpzuYyd04tm8DtBwvRAY8Rey/TWS6nEpMq6XoyoUbzjzJ+zOcynNAhNdHM+Fr012J9dx7yCa9q2tSBJ98vAjDnEL8XJPtlGBPu2OiulU//9otOPOx2X2pWI5h6HI/fCQT7JJYAdLKbDE/tukiyjrHEMcJwTxKZlwW2ECXIsFqVOtv4ls3xviTQIpBWMk9EXFXuNu2aTX9WB3DhcEaZ4qLbr1vhy+sT9Bb+9jrwojd22vxLXk7JareCIBWY9gBp3KP89BNpg1tye9Xc8C6QoCSO09YIYhjHP582mxBZrGSXSxahNL7X7xyFQnpCS9QGYvs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 7f57397d91a90d8fea689a6d095c30c974fd63f6..4fed2e1243e05896c7e67902b6a9924bed1a5ea9 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)) @@ -3354,7 +3354,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; @@ -4924,14 +4924,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 " @@ -4945,7 +4945,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; @@ -5179,8 +5179,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 4d88cfe71caed398d376030c9ae06d3aad6ae00c..08a7f5c6157ff984d6e37751ca5398adbf80b607 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -906,7 +906,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)); set_bit(NLP_DELAY_TMO, &ndlp->nlp_flag); ndlp->nlp_last_elscmd = ELS_CMD_PLOGI; lpfc_printf_vlog(vport, KERN_INFO, @@ -1332,7 +1332,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)); set_bit(NLP_DELAY_TMO, &ndlp->nlp_flag); ndlp->nlp_last_elscmd = ELS_CMD_PLOGI; ndlp->nlp_prev_state = NLP_STE_PLOGI_ISSUE; @@ -1936,7 +1936,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)); set_bit(NLP_DELAY_TMO, &ndlp->nlp_flag); ndlp->nlp_last_elscmd = ELS_CMD_PLOGI; @@ -2743,7 +2743,7 @@ lpfc_rcv_prlo_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, if (!test_bit(NLP_DELAY_TMO, &ndlp->nlp_flag)) { mod_timer(&ndlp->nlp_delayfunc, - jiffies + msecs_to_jiffies(1000 * 1)); + jiffies + secs_to_jiffies(1)); set_bit(NLP_DELAY_TMO, &ndlp->nlp_flag); clear_bit(NLP_NPR_ADISC, &ndlp->nlp_flag); ndlp->nlp_last_elscmd = ELS_CMD_PLOGI; diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index 43dc1da4a1567c05d6ac5f8bda19032737998e64..b1adb9f59097d083a3ae24f4ddf6413350a0368d 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -2237,7 +2237,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 874644b31a3ebd815d5bf55bc4b3464c94d9cfa6..3fd9723cd271c8a024b6f34e583668e973404e6f 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -9012,7 +9012,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; @@ -13323,7 +13323,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 Tue Dec 10 22:02: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: 13902175 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F65AE77185 for ; Tue, 10 Dec 2024 22:03:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 006AF6B00A2; Tue, 10 Dec 2024 17:02:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EA8A76B00A5; Tue, 10 Dec 2024 17:02:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C5E6A6B00A6; Tue, 10 Dec 2024 17:02:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 9F5736B00A2 for ; Tue, 10 Dec 2024 17:02:45 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 5A2EC4296E for ; Tue, 10 Dec 2024 22:02:45 +0000 (UTC) X-FDA: 82880423766.27.654EC97 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf08.hostedemail.com (Postfix) with ESMTP id B9407160011 for ; Tue, 10 Dec 2024 22:02:28 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=f8FLrazo; spf=pass (imf08.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868142; a=rsa-sha256; cv=none; b=0s/IPvmz+jWsFamlbQ+kr73TW/Qf7qpixiLe9bfdZHAznqqUYrLVXWIPmqmaUeZZbL6UG9 0bpAwLCpn3GSMQDOMpse5bPc9rdDjhk8zXjwa3rYrn3+QOJOC0BfOoS0EYuL11fBA47FZz QBaX3bdxUXe0xorDLGjMOK6zN7GbbVU= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=f8FLrazo; spf=pass (imf08.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868142; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BGnsC+198VTSc2YUOR+tnnzodlQEmbpaf1xRkHMeOLA=; b=t0ZDut1xUjcmLknTZyFET0923+R4pkfaGIaIRyVu585XpW2rbeHbNU2BiOZ7aOR6QwXFUK mxywJhF/ADm11WxXf/Ykpui4hLkuwLH3J2UykcNZ+v69SVi1V70FLiBYoeeAy+RvAmP1EO xiM0deTgqtPRDAVUK0HnrOvhbGbF4F4= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 40433204722F; Tue, 10 Dec 2024 14:02:38 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 40433204722F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868158; bh=BGnsC+198VTSc2YUOR+tnnzodlQEmbpaf1xRkHMeOLA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=f8FLrazoOSnG7X8aDWVI3nVNlHmQntetz0EU8Jiq9ArRSLgklxjGdYHhwJFkuGOqx IH/VjuOQp54aRZNV03h5piA8Q49loXnKOX2ThzuLLFf9IwCIw5oEVNJs8TgQ/6gM17 zOuBTvw2xYfRYO0jrQtMw2wpWhKIeaajYB7zt3gs= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:41 +0000 Subject: [PATCH v3 10/19] scsi: arcmsr: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-10-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Queue-Id: B9407160011 X-Stat-Signature: d3w78s3ke3twfy9orhriq447dchqbbee X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1733868148-196576 X-HE-Meta: U2FsdGVkX18iI9v3PpVBfb3vTdDm4mO0eaFRK/dIc000jOlLjEXEOGlbJZWuTeIPdKprdbR+sXme7MiZ6CMifs5KJZ9W7gSv3wm1sJltKtGUd2OjDmMybhwR1dM8Eoq8OgbHSEjkQQx+5Ux4sqSzRg4OwS3pesWskihqxAw8mS6xJmuyk1/o90SHPNERAn9Ctkrmmux28whQUSeHAqZJhcWclkSQA/vwRxx3Mys5tls7uurmeg1Ubk2ymGreI1qTms2kZkDb3visH3mNFDaf1sRexLBtatNo9T6IlwjAOvBfxAPnrMh1xJO+6RFqXREheyYhTuzL/iTcfRD1PSs3RPzJV3l/he3jqcUF0jDzl4VB/yCm4XyVFDYxYLyjWAslSHhF1mfOFjhtKSp5igVOmQc4PmdVK4/HUxdrlydu+i5RFt5dyHWQ3wN62i7jg+d6QbP++H0Flu1G2sD7hi7xyy9WSDLO5LW5UN8xPH59U+EKlIOBsPoHYhvJeGZS9dw/DFzpd6JCh/H73RIq2Qg2BxnWF5UxPzZ1NF6dBKCkHkuIBxoWZ/B0BrV7iQ/2Kq1bqlEGBi57z5Eyc8GVAgx+fxPt50rDJTOPEdPZaH+sIK99YXi8IILPu/xjyOxcQSj6kmbh9vLfVfHJ1xuQsKl1Fys3pLHYj59R8vY96eWo+vs22QB86bXKr3bKMRheRrOm+Zd49PZ9BiT/X6CQRTkTKV9nmcM2/Qp2e0TsvYQdrE69bzrOPmKI8+OlFr+IH9LXvKolEBiZEEE1lNegXaBPt7j8UBwO2hymMN6mNAcDxr4TfeYwSVieNb6J57WjIzwRk1v1oIIAPO+g/a1BdGHa4VjL/haLsbq4N8DQ+SbvZ7SIcik7MDTIzwu1AdPetAdujbipYw5TyNDct7Vu/4ANTipWvzhmMf208vCCHFmJcriIDsDaO5+pMH9ARB8bCgXCms80CfA16Bndm3Uql4g Glg8buBe nGN6IpFdSItHdtax1aATGDeiXk0uL49d59QZ3NZCQ3KguyfdldS/BRxiqZmgkazUQb+26Gw0BLwf+HSpglK1M8zer3mU5b2Jb34ooH/NhdAHlHm8o+Y2gok1AkcK/OC7kAg2LX5KMAuc1NEKimLuDyz2mnuV1MhdhUfh0pi8jtQNdawrxW6/Zdjo8FXU5H1b5TOkkY4z2ySc7SMO1kvNAFOgMJF9xSLFLajJz97S4Hyc+JpbRxQto6tJZxqLaHIZx3WayG0FkZJRzM+48z60ljEE3GWVeiBVQenKu1W4ZjvNM9IV3nHHUcuCXOBolQ0xSBPAh5hTILlKQkJXUj+p5dDB7Rjja1+qEdG0rtqjTkaG7Ns6vkk4QEvr5nu635aZ7wgBHnWWof9MPqtKwltVJgHvAsH8n4p9RvxbbrQq3XuOlzXw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 6a32e3e0d516881fd87a56a394607930582644ee..fe7de7705b7e2c84324f1a493f7825343d6476c6 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -1045,7 +1045,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 Tue Dec 10 22:02: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: 13902177 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EEECE7718A for ; Tue, 10 Dec 2024 22:03:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9318C6B00A6; Tue, 10 Dec 2024 17:02:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B6C66B00A9; Tue, 10 Dec 2024 17:02:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 708D56B00A7; Tue, 10 Dec 2024 17:02:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 4ED996B00A5 for ; Tue, 10 Dec 2024 17:02:46 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 08CC5120EEB for ; Tue, 10 Dec 2024 22:02:46 +0000 (UTC) X-FDA: 82880424060.12.09D5EB4 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf06.hostedemail.com (Postfix) with ESMTP id 93F0118000E for ; Tue, 10 Dec 2024 22:02:28 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=i9DsTNH+; spf=pass (imf06.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868153; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=U++D0WKRUcBPTXKKmA8ay83+fBnoO24djfuDhPxnmd0=; b=lwKpCnj5PH805kzF5ZBH6mG+MZvRTcb37t5040O4LPrcSbFTPGjuH8jyD6UI5gwDwOoqOh n6YYaQJ1aqpU4XCyzTayxlR8Fz58d7JSsk02gB+HwhE6JtYZc05t+dWm1GTSyIo/bsXS+8 OXZVkdy/w+/kjvQDTfHRx5+EGg1VLpE= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868153; a=rsa-sha256; cv=none; b=V/GLCQ7fHEgSyl+VuxxS6T8LF5lGBIFPs4NG2aF5I0xesYpBxao+tfd1iEmdG1Vj9UR6kO v4/gZJv8ctlTMWOt8Mr512MhtvtuvpyctpfxiFIbowQjA85nvaFw15p2tzSJ4Zyw5Z6C8m 8cE74XnadxkZxprqMbdliAvDp1uqc50= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=i9DsTNH+; spf=pass (imf06.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 6FF4C2047230; Tue, 10 Dec 2024 14:02:38 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6FF4C2047230 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868158; bh=U++D0WKRUcBPTXKKmA8ay83+fBnoO24djfuDhPxnmd0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=i9DsTNH+sl/IoEAtSjlSJHTOE30TcOTSfxv7yvCJsXzsKYC64wXa+LBK94U2wED8+ 6hMcKIbUoHeurUTa3oCFtWHdRYvf3LnrkdYUlQGzEUBgp5Wh7dgkbASpnSVSuIShxl Qe59P7FSrX+a5TC/+UUUxnQ63OeNqL5idRg6Tx5c= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:42 +0000 Subject: [PATCH v3 11/19] scsi: pm8001: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-11-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 93F0118000E X-Stat-Signature: rn8zsjdwuu15hdp7w1mpzn86xuchqp1k X-Rspam-User: X-HE-Tag: 1733868148-229052 X-HE-Meta: U2FsdGVkX19lEii7/QoVq868cpfDJ6+5PPxUz4SWZYAVNFziPqYTN/bXMLKNnj+nta+tS3oRsJJZAzYFGQPsz4ZeQhxk5BiD4h607Mpl5Uqi8RqiX6aguNsmtkdwusazxeMOfXHvKYHTtFX5Aw5Jt7DfkfAlgAhxD4hIHLFLsR2Id+7ni6i9urFDBgWH4VofdxFySeS6WVlaw4vPTtWNzt6f+fWbFoufpUaggNUrO0fPJuV78X+xmlD+HnhVITBdqsy0eX0DwGdqmFtw/RxDWJOEWWPK7q+yfJVCqqRmWUznLZkm64XAzZj2/ODeEH13i8ozmbDPvSzlNK6xQWN5UDKuGBzEZsk1bhSnUAgAYZfpTQkZTGQH0pRe1E6ke9+jY5qIMQvK2i2cDVoLA5FcNp8yWIf0fppRqS4pQHHA9OOKv2wy+rit99tv16td6qEZDVQUacVsOPh8rsG5gA8HFdj+WYKOsoT6eknaCEyGBPHVRdVt0j1HnHLtf4H78dTJpwKPoFjkaOCFqH2NMcijHynlHrR18KpHjBqlpnhooMRF44zLROhnuM71ABcl+gZ+gEdnPv3cV+HmLd7wAUHos4weKz/GdAWuPXIkSvF1SrziwqA3fCMVS77noeLhwiPUzv4i6ipjBREo+up7pPvtKDuTakfcjej5UWj/Lza4tO/DqeWzYnxt2cTlT+DIL5ygVt9OR15u6cKpu2Tisym0ES2isUX0urHtDEIcggmVua+pxSirZMO8bgGFMYJ/obSToIMJx327bEHtwqkbcGoCJiOdgQ/jhJl+IYxn1jVMnREftLWmtHW/1b8faTWexKnlXn7Rh8q0MGEkKDqKThi6rpPFmf40BucwUK2uUQ6GRNbrblfn1ubvma+SlahzGBhY1qpQizQlSSYdUDVJQFWFKDgfaw0KCnWVSVGFR7f+lYBOiexpNlvhfLYzBZeOf5O38fewVx9UQ3cMhq/RRoo MqcGBJYI XBhCPcabbxc4v7uKksw/hsauHPUwUs/5X/mLBnDVbfHj8PFkXnJH31OahtXiND3Daz8ApP3JFsQ6jZzpNQcZ+PPiicdFf6MUERU8N+DkzsVghd1B4WTzXLi6MKwE31o89mLh+P7QPnOIJ7cSaL8H01X4uMl6gUEV9s5kw1Q7zPtKh0LoMQmCRDbv28I8xjhA7hSKqusC+9B3uw+3E+yYZmkKXYAdFxEZN6oB847eMZy9ETZfjkFDqnR5ymoPZRlpsNwc3ULVi9AtRrrnaMyBE8F869VzOCNio8utgXMz8LsH/OslZgV/033gHRBbpWUQZJCb5QmRGxv1lSeBnhVsWsh2VVCD6ufjecKvs3YEZI4PKEvB1KINetYsi7iSGIKR1+OAo0tr1VjXkAgj25krhthyE+3EbK9DnjvddwJgQpaefjrX/w47YGDbs3Q== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 f8c81e53e93f7849bbe7fe9cbc861f22b964bc39..22e0e79e88ab0a60965ff3809de116eb4a6851e2 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c @@ -736,7 +736,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 Tue Dec 10 22:02: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: 13902178 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AC07E7717F for ; Tue, 10 Dec 2024 22:03:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 64C398D0015; Tue, 10 Dec 2024 17:02:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D1E28D0013; Tue, 10 Dec 2024 17:02:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 421B78D0015; Tue, 10 Dec 2024 17:02:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 1C4758D0013 for ; Tue, 10 Dec 2024 17:02:47 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B7FE5AEE2A for ; Tue, 10 Dec 2024 22:02:46 +0000 (UTC) X-FDA: 82880423892.07.6CFE69E Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf15.hostedemail.com (Postfix) with ESMTP id 95E72A001D for ; Tue, 10 Dec 2024 22:02:21 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=svAtqGWU; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf15.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868144; a=rsa-sha256; cv=none; b=V8QqJXxWKpbaiCst4NgEA17VtTs8kHl7R0LaUFYHe2nvLXK2nLCOE9SUbarfL+lcgMiFvd Akto7xKRdR9kd0OEiN6AqAe9iSyJuitmdmQIEWSdVbK2rSOh9sOphPmdEAxDPlSb238nbk MKPKQS/qVAeBFbR/b0PQgW49pEGB2ps= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=svAtqGWU; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf15.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868144; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gKZLAOaJwfAP+6Kmm8Uoact7ay9fLs6b2uIK/ai8VsE=; b=cWQHm0FHVM7bs5wdL1O3qYshHjz/XG7pYQ3WHm5x/tnSBhaYx1Pc1CTxz41EYWpznBRiIL jXMMHD6d7O+/fOtnIYR3WcnkAq4M3MCBtxuDUmvLC255Df1WAk/0dKzM63lN3uV4HmXbTz A6xRBGFS2UsPDV6ADTY3qxR+DH1E9C0= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 9DC932047231; Tue, 10 Dec 2024 14:02:38 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9DC932047231 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868158; bh=gKZLAOaJwfAP+6Kmm8Uoact7ay9fLs6b2uIK/ai8VsE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=svAtqGWUfwwxhkPtOsHM9wFpOe5H7V37CPLpc1efEJB+hZDbAOkD4T5b6sfMzxhZ+ yP7ZIp8mBgs9llSr4qUZT5sBXpDyffL9kReLgTxKKh0F7Rks+AtMLKTRz+ik8N0b4l Co5R1xYnpZA/XZN3kdMilWWEgRejdEMkmjUvT5B4= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:43 +0000 Subject: [PATCH v3 12/19] xen/blkback: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-12-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Stat-Signature: y9i5uh5c8n688s19hu1isazaf1jzyb1a X-Rspam-User: X-Rspamd-Queue-Id: 95E72A001D X-Rspamd-Server: rspam08 X-HE-Tag: 1733868141-345903 X-HE-Meta: U2FsdGVkX1/+7Dla1dSkwgsTX5uEuPQENiSIkEdEN89majPvLeUaZpCiSJSVtLTg5oLBHR+NPdFG1YAHtaEdE99c4xb0qJlta1GbLCq/bnDCuieR3uSFb/dSM0FiW3fF0uwhAFKI9toKKrsjV7rILwcHgec3a03Dh5eEM1CgbCLL98zLrREyis2ddsgSv2iv745T0l2NyODlEQ7muu6mXErl2CdMq32GpnCKCUHTen/qvqfXA1a81HCIJT+BpFYWWJsKdjV9dFleXHydyRspB2qnaxHzJ/wavBS1ejbin8JZgAvUKdaS4WfQc5Jema9ntr+v54I6VE2Yzx9w7JFEBTYl6vZb7hlHBXhitYyNXU7zSIcVd/h/Ux4o+UTqeJBmt8lYQkVdTL2n5xZn/NJNUFEK/f0808Px3743G2ux3glckjTojCP6t76q4FY1p2Kof6ul0GCTKu/tvw4mDmW9WNaJiXoL0b//NZMLMdn+YLYBbKfM5bXZwYmZN8sopIQJmYuo1zsUalFMqtdjxeJj6gtSuito4z6XtoC2/g/UPaSrj8FlW2fy4ucxBlzqwFiOgjDTWPclW9cFT9YdrtcY2MH5T9vkcIklJPBm/qWUYHcwuBiiDjGnkL6f9B9CF48q2wowf/+rC39c3S8rnPknMOyhzvdQ9ccmBq0odVX9+s4hN4M5VfK9Kf79TxEuegrkTkHlWCvl17KVdd+dwEIPTEs9DdNGVNdJSnDFvZI3JfKXyW69y2uGQ/FZ96slQ44iMRrgQtEDWOF65RAH9lzvYdXWJXFIORtuxSbMTdrINUTSGNB1cMjPysvbUvzrcYWBV/I3yXF4S7APq+t3RDSv3+NfcdGRyva2y827xdZ3rBezGAdEtlxHPGVuN8D4ejZ27pOFXAV2W4zPvrG2h7CV55PNoXTOEhZ6dsrv0qtujoLmAgBO3+nyal/xyWjuzzoOCIJ99xWFDTdUwBT8ymz z4gb2p1J Sz0MM/evWIoV6hR/X42WKHlPNGOBTd8l2efsQ7ZVrRqMoyA0TiPVsUj0XmzhHmpl4jmLHynPVOG+Z5cITi7pzeluCJtL3rX7pYKdjjiZUwlXP13moR176EFwX3RDKW/D5t9xk66tjPdebWKM45HDg789evAEqoyKhoaLdu+bVXlLaYWUDOqU9z1kF8KUIRDS44EKbY3hRfwm9pe6tSaYON8h6Q9PC+bM+mgNnWFG/dls0b7h/CYiMxYhwxoSNXNfNQSWKv0wGhfsXC3btFv6SkocF0fpKUA44/gxysx4245cjtnj0muDYo+1Ghf0GAlnJUktH4xzI8YP76KpnPfndqkMk4o+AgbyYY90RARSyrN/jrKDREqbPIyLb2qjIY8iLLdVJHTmaII1iu5EN/iPmTnh/2omkzLVzoC/dW3zVRCBSnik= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 Tue Dec 10 22:02: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: 13902184 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CEB7E77180 for ; Tue, 10 Dec 2024 22:03:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 85CAC8D001C; Tue, 10 Dec 2024 17:02:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7084C6B009B; Tue, 10 Dec 2024 17:02:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B2306B00A9; Tue, 10 Dec 2024 17:02:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D17D78D001D for ; Tue, 10 Dec 2024 17:02:50 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 82C1BC0EFF for ; Tue, 10 Dec 2024 22:02:50 +0000 (UTC) X-FDA: 82880423850.08.A5608EC Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf12.hostedemail.com (Postfix) with ESMTP id 223B84001A for ; Tue, 10 Dec 2024 22:02:35 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=MyS1GphF; spf=pass (imf12.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868155; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Nu1FTDRwT3eJ8G3TZ1SOaVXDK1brjinK2gy4k85VNBc=; b=mIkk1l+XhyfbQvFLN5iZV6S9ZLD7nBRgruwXaOaMs80qMR9WiL7d7fJTbI8tkrBYY13qxg lO09VASN1VoOhX2YIZAXQMPf89JTS3xTdtmULSGj1eNgNhzWcB+IUAGyLgXeyKcicwrwWm 1nCjaG0su+7C+ZUfiw4swBo5AKDUWNs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868155; a=rsa-sha256; cv=none; b=koJXtrCfZjtuQ93bDmDv1Idf0S5MX7AF0yBNHw157iKaqVepGCsmNqqyoFQX7CVzfq8AsY OxiuN1igUDykM0NeHORhC2ol0k4KeE5/8m3fIotAiIhTiRUe4WxnB/1/bCNxZOZR8wB8NW 7iYgdYfCq4PvUr8g0Q8sRc1HGI/fxss= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=MyS1GphF; spf=pass (imf12.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id CC9872047232; Tue, 10 Dec 2024 14:02:38 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CC9872047232 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868158; bh=Nu1FTDRwT3eJ8G3TZ1SOaVXDK1brjinK2gy4k85VNBc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=MyS1GphFvmGr2JHW6tyCf5nlmMH9PAcPu/qJOqDicxYHN3ga/E8mPiUpYdOmKe+08 ESmMPf61fW9R/vd5fEqw2UI0IyMH9O+5zBGiCitLbR/PLOMP+sV+LtAwK3GV6cBnMZ qMuvwZX6TCbpYuenDC/gzSBNDFt3OVWamZA4/4ys= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:44 +0000 Subject: [PATCH v3 13/19] gve: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-13-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 223B84001A X-Stat-Signature: anr8yq1r38bwewx7sdkhhonjmeq5f45q X-Rspam-User: X-HE-Tag: 1733868155-533665 X-HE-Meta: U2FsdGVkX19n6lUL0S0VNonazSaciOM/QKZF4E2zWBpD+weBPM1gy5Z+oca0FtZtI0M+6c/4g+NY802YHpf/EToYZ18twKMArdNPcxvcwnhXXKrQq4DWhbi/WWklt23HKnQJipOVnkuiTxd8RBWZ1jBbBMYDglNaXyyi8TP9kOAvzagV5PFko9nBhD8RX4fcFIvDJT6xouLcZ50BZ5xOLe/UkIKoD52hzIqHkP6bcknyqQ06qOVd2SS4JL9bmugA/Tu2bJMmhp4Ye4aoOy/FmbYTcFOFeq+b6mme8EDzGyOt0xQsXB9+2sLJxD/Ro1ymjxgUV4TBwAICOJfQvVyAh1oPwFEGOJiIGfitSCsW4f3v77w9Deq1uwiLaDqfAarsvfvZuk7HqYD4Mtu1RLcwO0ORu9egA4jxFHyqY8ArnjZ34s2hPgdS2E3wYmYYokmnsCxrKXZeijZ9kQNPy2BG6K+wZw1pqPzsflVIniVIuI3j2CuUC9VGRSxNebELn49+xaLKmh2GqHG7oPzR34h1rea5y5l1zdcmYIE/xcRyra1/9B3JiPOSKaqaoMAeeEHhko60cH2LgKjuSzjgB5dM4GVhkqNGcUuMNk9qDh58J0ifdsi5sEfmCrQgJ31Ol5AGeLabD03RG+TvREI32rPtV1m0pA8KFu0sUYkXynUd7XWx2O1V2jO+v0T6G+Y7rfag2iS934xykQT4/+99ofmY0osvq6N6jmJ7VUCIIxEy2lYhe5TQVDYwWlgBuGXFC5qgswLgWz6r90G6vLPWS9kSPuTH0DBA3MBD1KjTx5Bj/tS+hh9icq9YzE8AGovH/csNCreIOKrI1lSWqIdLSMvs3r1j+MnbS0toXADzZFI+8vBkhc/owAK6LKyqjWumTqGsFf4TH3/W/p8K/G0510MjXFsOkFKUinf+sA1fWNDXauwSYd1RdXXljAn4Z4d4u2s5v+vY8IZAd4V1T2tbK3G YPXQh3Ip IKjAn/0wYHNcHp5j10Ne8vyHKP8aFGgORyMGZ1m6K1+BxHrtJKa15+HCfGD/Ie9/s6vv+ckKNLBwIv0rxrh0Uxvxr4rz/Zf9FyCK0IYM2Z3LCKPUwmggNKNbLvjlRLLhV18DuIHgKkciy6IDPo9vO6cShQuqlqmF3ues40tgIj3xON6B1V6O1l97dlxoodVcvWoICzJZpX2aFy8QW4qzJJXU7KKV+/HucsVcItE+imLUPTZO3WQ0mSp/aUMKBsb6UmBAN91NOiId4ybJ9KH9E2wuDNurTG6+Olc8RbJuTzi+YbGEpOEqt61ao7OwAj0CH/aaopMQQnn842w1PtPBoXhA0NxaDE3Lbv2Otl5Zru1Fc8zRSmOox42+GVB74uF/OqHINxWD/4bDDB6X34TqCDRyCyX4Gre+/jC4yUvFh8/YC+tMpDxs3S7nVAA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 Tue Dec 10 22:02: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: 13902179 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C53EE77184 for ; Tue, 10 Dec 2024 22:03:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2C47E8D0016; Tue, 10 Dec 2024 17:02:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1FEAA8D0013; Tue, 10 Dec 2024 17:02:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 002CC8D0016; Tue, 10 Dec 2024 17:02:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id D11B48D0013 for ; Tue, 10 Dec 2024 17:02:47 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 96E1B80B91 for ; Tue, 10 Dec 2024 22:02:47 +0000 (UTC) X-FDA: 82880423934.07.506F706 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf28.hostedemail.com (Postfix) with ESMTP id 431FBC0009 for ; Tue, 10 Dec 2024 22:02:20 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=WbJnm80T; spf=pass (imf28.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868151; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=VvjxiqfKxbyi9uGzXsW8xZpGKBVs2F3SKydD57RgoIM=; b=h8MrAZ0ZbkQc+Cg/tP4WRSy3gFoc6Y/hJtbu5QSAeIJTS0J0deOWwbahitsbNf3I1A+8Le IH32CcP0VxipEv9PkBo1S0ikFPp5uvbSrk1d1ocwTAorNTUosAII5NcTVR5guTgZf45WRq ayUNNGyDqvZVm1mtrTkGDrb2EWJNTP4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868151; a=rsa-sha256; cv=none; b=qZ2/KZ9PFLX0KA0tNHLNB5i/LsGku203PnAx4WOMdD2OIfBpE6R4r2jbiAGGtG9NfKplhi y+8bvWcy9GJUA9HDLon0HHHmiKfuyBLmtrKC4wrxP6HMklpiIQpYqU1rc4/6u+CCOBqsVT xOavFT924RJaLVdRKM8BIEIQmxnskQE= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=WbJnm80T; spf=pass (imf28.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 05ECB20ACD66; Tue, 10 Dec 2024 14:02:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 05ECB20ACD66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868159; bh=VvjxiqfKxbyi9uGzXsW8xZpGKBVs2F3SKydD57RgoIM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=WbJnm80TvYnXykJB9DgMtqoZ50ou8AhS1efFy3dCoV03536YA3dJhXmL0IMKChnpw CujNWFZtiMOuyACXPjtJ3tU0PrbAysQ8+2RTG/TU5ekLFjjJ/pUAEWKon7ssztFoiO F9frqglM8e2VebaFFRHMBRJ+sqXulRejbFKVUSag= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:45 +0000 Subject: [PATCH v3 14/19] wifi: ath11k: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-14-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan , Jeff Johnson X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 431FBC0009 X-Stat-Signature: mb4akdfa8czsiawph567w6mcurp9pcii X-Rspam-User: X-HE-Tag: 1733868140-979962 X-HE-Meta: U2FsdGVkX1/ba2jktXljgM6LJp1oUQK4e6nL032dCHXMR+bbRCjuazWm0Vxncix2lEsWrYR6YekSn80p19QT/j4bSg4luhXVE+S5lSLwCfVJooC8+v3R80sdks9y5xdA08afDTTNE32Che1yIQuBLVQWS/aWxS5ok8A60MzRF56papRqUdWImz1y95lS4H7SuvzgmK5WcPTXNeUjMsyAhVsKrmhWQGrvYw/qJPg3wK5hLXqtbDyJEYG6D4lGBQHJ442L6OzFwjBMntHUKSfBr5bc3bY5Vqn3zC1l8z7yZbqFZ6MbGUY4Uj3+36BgeSRyeshnqRrm/TuM76tdVLSiOxE3q3D2WqIycQ0yVh9JkY9f/4+iJrIji2mhhhouDpW9ZGxZVXayrWXv9YgUI3miyOTuIw+LKbw9uMl5vEwkhntjQ2aJqkuvwTHENm8ZkevZwi1EeFV15ORsH3bzYv2qIs8bZ2rpl0LLk0xAXrdrYXhxSR2ntuwQu/754K6YRwHFroQeYHxjRe3iuZ83ESOc3LS3zAHmgcF8+SnV3UdIq5ldGuAPio1SnhQs1JCZl9x4KRgkF4CA/oB5gI/hbP3Uleh6dQBWTJjYcuvaJY5ThsbEbyrni6uvnOWa6/O/nKQmn3Xiq9lkRrUxYIOH6N9Ch4f63oz/g8bAsdnzDiPf6Ug2jpD/ZFBk/hQ/VCWIpPJmsyPALsbRpbVWGAVE3mDr9XQAElmAkUra2uvzHiuzr8O/ozKS6YZvPW24r6IIx+45oUBXr2GVXypXoudn5p/5vpURWoAps1U/rhdCoqXK0ZGgmlPcKBGaYi2F0FhUYkx9w/IFPXsDDa1vcu7zMCPtWbl0LHCKiQTW4Dc2gYEK5LqJKAud9CUBP9Dj+Qhqfdd/MPqvnC+eQ0g8Dhx7BYqVrVXz2wVq7S0LOwmBKKenGYejVb9j4tx2WKROe3LLR74zLiDAJ10xM75nsbjGjMZ 3IsfgWu+ xTOPccVoIaHdexCn395kQPolFdfKFNElccu2lHLaOhO8VJcVo2tSz8RMh1Aq/rbId75isKGfqQHuKX0NnAVa2lG1tKEFy8lqcuGlMmZY46l4GqltyygBwncFqP9WTeOnjIPESnJ9OfepKvP6bwghJ1j+PQI8Mow+y/CyHZqzLhtEm1WCTpsYIZK+fNuo6FOo+RoObYRarOZsDsQy4XXuFg0SSclxaYmXP3BTp5NHM18KPEQk9eGfdrfPGEjVJH/Vl4kWwyAVPgWsnbvJeVSYK0ZuzvBVQfJz15gdhkrPlw2HY+2f9jBdqc3KjFheOdTodObOshCORSVqzs+lAcHpXfo61h6FBJtM/VJGztScUczXA9Q6vVPxIOhUwc4bR7mQwazccoGZES311RNSIQIZm3HaKCuKiwrF3srtdqL23wLv022IAuGMVeR+bUG5OayH3JpGRmy4jHILMGF0Utd1LeNF3+D33VL65W6lxfaeirwbKKN4= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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) Acked-by: Jeff Johnson 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 Tue Dec 10 22:02: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: 13902180 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A6B7E77183 for ; Tue, 10 Dec 2024 22:03:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9CB4F8D001B; Tue, 10 Dec 2024 17:02:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 952E78D0017; Tue, 10 Dec 2024 17:02:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 730558D001B; Tue, 10 Dec 2024 17:02:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 51DC48D0013 for ; Tue, 10 Dec 2024 17:02:49 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 88382140BCE for ; Tue, 10 Dec 2024 22:02:48 +0000 (UTC) X-FDA: 82880424186.12.9EAFE77 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf08.hostedemail.com (Postfix) with ESMTP id CDA7416000F for ; Tue, 10 Dec 2024 22:02:31 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=R9JyWtdI; spf=pass (imf08.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868145; a=rsa-sha256; cv=none; b=ENuU63qehTlw+Axi0fh1nP9NFEhrd7DDQJS60zI61zsTFNXXtS/iS0ktpwyqR9Up4kWHcf HWGIgaX40ekBbSinxf45vHcKAAG4pfILgJuN8RmB1HXeQUVNEXTumkA4j6vARCzTtKbBHl Q5J9cFX1wYT81jO/SEBJGQ5OYQKn5Cg= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=R9JyWtdI; spf=pass (imf08.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868145; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2KdSABVpHGeIl3K+Zfq51kwhEReKGYYzt3DUWqeHGog=; b=0jKQjcy8jhRv0vQrAiu31+oNftbYOfDN5kP/6qogmO5XLFTe+gsL6pwQ+pMctnyQh0+kh0 wlnh+7J1Mg+L4JMAL4HOaX5WEbni64/pNR55LkHCYfv8on4eOT7T7xFPU3v5xiaR+VWVVJ JRj7La1S+wNp2QMMngRYFsaZeIoCicg= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 3576020ACD6C; Tue, 10 Dec 2024 14:02:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3576020ACD6C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868159; bh=2KdSABVpHGeIl3K+Zfq51kwhEReKGYYzt3DUWqeHGog=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=R9JyWtdIUEb4/zKyVfibrupVtLSA8I4Ge9h6DsznbqwDXYuMt91s9gMK2E8wvHrfF DAI6C0uY79rteNLP8XN3j0zl2c4hIe69V64Jd/WfL7mt75W43sZOrZK3S3e5zHR6NX Fb6Kd6ZyvfvV2PAG+yCh6AjQd+L5BQfffwiXvwAk= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:46 +0000 Subject: [PATCH v3 15/19] Bluetooth: MGMT: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-15-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Queue-Id: CDA7416000F X-Stat-Signature: urcpmw6njrqy8w1k1qnd7poopxkmzuge X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1733868151-971843 X-HE-Meta: U2FsdGVkX19hYtHsu/l6ydY3vpbnROQ0E5E/THvJLSnBlor3Ucx1eHVPasbZ0eJyo0aPWHKVnmeGwDrFLUoJnUtbYmhmaDj1jmMVAoLkNa2wNzFpaPQ34w2tN6AwBbcqrsRV+7ekiJz9D7FRBya/R08qtz2SzPtSzmB3jCfj2oYCg1cM0JcvVGXoszXV8shzp4TDucGht+Su4f7QqDlCTCju3GWILqKWSnskKOp6vwdmRaXut6vnCExLKdGltiqJm95H4wCRWqc+5aidpxm5lnsEOMzN6lY1VM/vtT3ulgjaqyyiQUT8ZWQwv47LqRR/j78cS4IOUvlFTy9QrNAjvtYSI8pW6yNW1fAaM1upi6JF4m8GIpWpRmEkRzSAlDx0EG2nAOzp2b5GleZxX3rUGDhhU25o+9Io62e/4x/HQhZ+iu7ccICfWNEbpxQPDndF7DfPvUFq6VFKUQc/BCOAU1EQ3H34r4aPt8D8lC6ltC5Iu3vJ9aa2MQGKOIMJ6XVtmqJq9rn2yyc4vEs9IVh+4h4i4ufSkK358uMvO7TUTaVnIY9J6Qml8goaCZLvWOaN3v4Cj6I9WSonAOolRCgxEJwD+E+pQNDFMull3V5zNEo+HRm3BGEdJSSVI15GAz4LgkR3rcIWLnrHAynuPYhAZkjO3CqZKpPX/3pIiBkbAx52oj/YY2Hgvwxia9X2tetlF2Iu/zUZ6w169l7+ULKUvYOu/9v8ywhD6NW0cDZ9Z8tf2P8oDGmtGn6gx2XHirfDVj925CKS4mRu5Fh5etqJ/nay6xzGqXeGyn8v8etQFT7atLIacJya74fPXBkwp6FtaUS01J4JN8eeydz/G5IB/Hy209ldY8HY2E0Y3Buru/O+032UVeX/V5ZIPnP2WmgniLvCabY7jbrlZfv9LePUp33WIW5RnSP6QoMlBCVZNJ8epmSslzurfTbilDe7PgrjuwHt84UvXynbTkRTlvS A5Ud7Mps hwzKEPjIMHjOhqfCUW3xORV4Q6G6Znvq8ilMPdVdGoO/m0rr7PghuTW3UcQ/b3CgrRSUU/yfgj7LIdHEpClWRSUWLW4HCJh/QTiztBZc8+oOt/2Yr9Z1DX4ZqU8JlJC68qgHDgav0H0zumTnlEWZ9QLHx0MsQOgawMPEarRlMfgP9c2Bij4FLBWLUN3hKYD03Ql1D//afIunVZda9mbwOp0JT2aPLqohgfdQO19OdOQ9iG/H1nn5lNQ40pQ7qL9s2lVTKEa3xXpDid3E/7f+MRWrlLrTE7/AU9MF0voAJFo5LqDhdV6CaEdj/f2ZokBDSjU9N1rsYHYkIyy5yDJFt968i5gE2gHyYA3qBluXYzT0M2c5lRE6EyBpOY0pA4sXf0RN2YNHhKlbEx/nN7TEzpd3AW9rNzEiy0TIUy+1rC6HwiGw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 b31192d473d09b663dc7babd107b4894088ebf6d..8c993763ee0f0360e0d92705f9035f47754b793b 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -210,7 +210,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 Tue Dec 10 22:02: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: 13902181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B1CDE77180 for ; Tue, 10 Dec 2024 22:03:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DC5D48D0013; Tue, 10 Dec 2024 17:02:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C351A8D001C; Tue, 10 Dec 2024 17:02:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7CD958D0013; Tue, 10 Dec 2024 17:02:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 59F948D0017 for ; Tue, 10 Dec 2024 17:02:49 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 1434E160BC5 for ; Tue, 10 Dec 2024 22:02:49 +0000 (UTC) X-FDA: 82880424144.30.FC2969D Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf15.hostedemail.com (Postfix) with ESMTP id DC82AA0006 for ; Tue, 10 Dec 2024 22:02:23 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=dOK8RnNQ; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf15.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868146; a=rsa-sha256; cv=none; b=kWogznItCj6/9QEf+0Wleob1dzW7OT0msUxghgrurPpysrklWBtfvR+PRAJGNgaS+Ozfsa 8r8+Ehe6RPoPUgRrkslWQ5JUKGmrmQ193y+VbGNKuKp3cIrJWlBNigmnspE9SV/bGvxA3V eMoOIGWfW9AHuS0RJt9CcDVIMMDSLYk= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=dOK8RnNQ; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf15.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868146; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=bkW4y6ENFXKRD3xTlI1AhDo8V7CjSAjUn/pFIvR2ry8=; b=8p15Xoc5XUw1rZWSp9wMlEd2UHVH1gZwk7e46HqurSZFNrz7ZGQl7+fiHrm+pcNkymp0UW 4LV7X/xvBzyW553I3oZ40uIaLgBVc15mbglz3Ikevh2nTH4BkLY5SHYjB82jRF5NTbnPtD QBrUsrmO18i5oiJtJKzITMWcDkb/xgo= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 6531B20ACD6B; Tue, 10 Dec 2024 14:02:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6531B20ACD6B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868159; bh=bkW4y6ENFXKRD3xTlI1AhDo8V7CjSAjUn/pFIvR2ry8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=dOK8RnNQMEEDnIPfeOf2mTH3/slP0EgBsz1RphSjHbLnDrQKEVkY9HcyDwOhMk5R6 eaO83rvpJomkJuzNdNBxnuRf37TDgqADuidRQb6NchFG64SiUCMfdU7nMnXJqoCbUe LiFzIadqv43ZC7HtDm7c2pnyXRduc6YAQ9XNwlB0= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:47 +0000 Subject: [PATCH v3 16/19] staging: vc04_services: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-16-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Stat-Signature: g1d9p93eppyiwdf6i5csczs1mamcjfmt X-Rspam-User: X-Rspamd-Queue-Id: DC82AA0006 X-Rspamd-Server: rspam08 X-HE-Tag: 1733868143-447868 X-HE-Meta: U2FsdGVkX1/ST+0ksTpRHvNhRQAEE4CI5g1UwALIdvlZiNQdBzunRSuuJ6DOJlO94uQikQ853OGNJNl7ZhGtknloJQWLc/58v18kHgEgoMC11mcWN78FXUvld/H2L4FD9PbqqrIcogcYffL5+J0YBbwC5IqQ0pme8+9Zpa+LnaRVnWKaW21Tl75pvB/WAL6qALVDAieQ0T9tW5f/Lto6vOwrY1SYXPlnCJO+J0bScR4BPMITaglKPk0KZ6g8F8lnerheQCIOoXt3lD0Xn8elKt7c0CNN4l9E7zI1YXHzC/u/l+jZbU2xBqKdbVVobncD/8pyuICdhAcNhct2Bp0j8tRpNT+XRSae11ZvrE5vks2W/URNObPsTXY8mzxHHG39+HANocmTo01TBrCR/1reutUrRhofrCYx51MNBWc+dukVdrr3SyT9ys3e0KHgdOC1YvHXv7fO+XyRpBrrpuucU9D5wUHTzBXniXqUmetXs2QHmtxW6Xgiqq6LekmWFcFhlFEkBBcFP01X7mdJXcFJEs3k/gguO3OraGwDf1YJHO2/fk6/jrekpc1+s7l8q5e251VsbWGOurikCypOuhTSPN28NNp189FaFeFow4vA2UT4/aN3WAmmZFet8gG8hGrpZVLQGKvUIxh6aGSH5Y3VzDNKRo0/8TK5gv9QdZVuJACpe0LPRzFRFccJjoGvCkcW1D11chNme7yALZjbIpTdbp0ipkvH8KIt0tB8UTI/rfiN4W4A1Jf0ZziqSG4SL2ePHGq8dgJ+4+cvqXs2GVcOzoWE79513tcanZgsn/fvuuH0WyRHpftpP+s8T29lEB+aT9h4t24rKelFYQxXbUPQw/j9CBIzkZmmvvMtAuQLyrN+h5H3SHZqS98rfPC+sGaSOS7NUoOw1ajrS846/OJK6aMJESN/kePxlfC26dIRGUVfJvYr73lgmHDbEqEQwq5mjMtkQOso9tvuwo4le8G PSBtS6W3 csE4dC933q4Lr/4N/L5iHxZAB9Ubu6NN23NAgvIRlaKzacmb2DI/U9l6/2T+8WYVcsFwTFF3OonoYnYl+X5Z/tqFiMFsaSdXgR+R6qRzmSjJwOPhqQy/JOaQcKlxSbCjYiyYqf3LG8OSiHwWMhcckQ5sfgcCD5AorIkcJn9dJ/F8i+BYAKQE8JgoM/i2NIiNIxrX5OBI0O6utAjL+8rYE6sI0qOTSbSgVed5MbTtfiKLSWThYfkYNBGYehOy28VYVb7PZbU0a76u9TkBvsg4u2THZiQLiOylQe0kKeToqnNE9+9fKhLH9/8EiPV58BCJ1kBv+XLI/92TX1tVjfMuUEmv1VkHrqqxMdWColGfdimwv4bRH8ggDoXrEb4XaDer7yCCQnbj0ET+4KyVXW9saYbwaI0V9LFrj76AB0pxV6oI46Hg= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 Reviewed-by: Dave Stevenson --- 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 dc0d715ed97078ad0f0a41db78428db4f4135a76..0dbe76ee557032d7861acfc002cc203ff2e6971d 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 Tue Dec 10 22:02: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: 13902183 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18FE4E77182 for ; Tue, 10 Dec 2024 22:03:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5301E6B00A7; Tue, 10 Dec 2024 17:02:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D61F8D0017; Tue, 10 Dec 2024 17:02:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E83658D001C; Tue, 10 Dec 2024 17:02:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id A96CD8D0017 for ; Tue, 10 Dec 2024 17:02:50 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 64E0742956 for ; Tue, 10 Dec 2024 22:02:50 +0000 (UTC) X-FDA: 82880424396.18.4CAD1EE Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf28.hostedemail.com (Postfix) with ESMTP id 0B6B2C001D for ; Tue, 10 Dec 2024 22:02:22 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=VsljeNAY; spf=pass (imf28.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868153; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2Yxce1Hb0/0P5cE6q+zb1yt8qEYqdCG+5Hx3X7W7CLE=; b=mfpgIY/b7wteX0cHzsRo2vGJH0DTzBLZS7I04xCsloo3aDjXIgL613MpUBTPbfgIuViERM 6GqfKzaOAT8io+gA1Nf1fKt+eaYNNXFkVDJ8M86Cr9NQEClicjid/ijcuOhDGQa3uQKVEu aBYPBuR+HnJyDG3JIqzPF1MBTqxidy4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868153; a=rsa-sha256; cv=none; b=sMiq3WsHiq2C+6Vw6XHUu7jaCkGSNP9ZfEOP0PsNDobjZOSwAt2tdK9YQADcp0gQDjGm/8 GVXPA55yqdlLYBH7eYDVArl0Pz6/w/ffKYfirJEbOBqwHiOn/OdMt/6RLYcEWSfGb2wBV9 dfDQi/hsejXLJ8xg7I90s06io1JA7Yw= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=VsljeNAY; spf=pass (imf28.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 93EFE20ACD6D; Tue, 10 Dec 2024 14:02:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 93EFE20ACD6D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868159; bh=2Yxce1Hb0/0P5cE6q+zb1yt8qEYqdCG+5Hx3X7W7CLE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VsljeNAYadFajIAeGJ9FMKFBGspy6ozrhBqU582XvcWkNMj13LfQdRwOadXZG5Pxf Argps4EtZvFIc7JynbCTgqDrOVF3u5K7Ah2l9+nekqV0coL2L+cEZsIcBHPG5GDao7 B4HNxmwT4io4VbogtubQ+pF0xj14MXNsqvxe10Z0= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:48 +0000 Subject: [PATCH v3 17/19] ceph: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-17-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 0B6B2C001D X-Stat-Signature: 449ywyutcbd8yrzx564feewntjyknsr8 X-Rspam-User: X-HE-Tag: 1733868142-80121 X-HE-Meta: U2FsdGVkX18aUsd7ZdUnnopa1LbGjbzYgr+Ufyv4o//boInbqiZW+iAecgBNLDbtGFocGIJHu3CV04Df8eZliGwAR/iFRveYsjPBQZgoLb4VcVCRe2vQvnWOG2eD8pjRzIqrdmxcHzWelLaOuiwlttWCw63iErQqmR61IYrXXdVPzx+7AAV5ZZiaX5OZ7oXcxys0GqevhKN1fGAGq3tl7LSZmkr2AVczGv4vArL+QIclTbSPPTK4EWuqs3fp5P8vwleR0Iml5EsMbPdD+GdOswYBE5INngaeYPVvV8Pa0dBZgiqsLP76KbTYVwIWxEFrINlM9dSp/UvjOAmRwZu4TBWJynE3yDHzPlhM1Rn6jMd+JXU2x/wYOyrkuSbjSYDFrSQPSYfoaWnEZr1rD19y/ZWvJd4BK6w3ESrBgHeOKh4BiZC31SPoiICS3Sot1Okxck6x0sYXMaCysyt/o1qfI4jmIqjZYGI5VNDDD3QAkWCMFp798A6VCs4IIvUUu+Fse1ujF0etGBRVsuhsjeGnElOgIuvHliCVOwo84hCwASFdRcm3BMaRW2tXrtfjUmCsDVyw8PGpi5Szx38MXT7fnuCTjpepGI8AGgVwobGuS3CYE8oC+KcAng2CD09Mv3VNnFSff+RQ8DpZzTxt5poTQQIzJgEKT9Y/x8TCoU5B4iLAcUQqMM+sP754O+ECA4R+NFBoWLGx8oaMluvES9llHXzl3ynlaBqfqQd0boyd7B/TMHVqXh6nG3rrAn0IlVBXGG7zqHIYZRZplcRsXAfHUpgwdOh5KiYMYBf5OWwuDWhRp0+OBtGX5sP4LS/xDmLfX3pmg63U2gQkeQgUna5jm/Cr8Jg13Pnv0W2ibfnPiiFYWTnhJSg41wypHOZOBRXqv8FnStTWD7UmhFmfXxrJ9lqC43tJ9wgiZpA3taeJhlBnQ+xPxpX7ssqjB3EjxF4V6lbQ2pRo6XfJHvU6XVW sMm0gtUM Vj8OrBbaI+nF+f/bO2jIIGxKwn6NC46yu4Az3Adxuig/u5IhhwrykI+PqmbZOHJrcGqwupasEqoDIJQyzRkMu4Q9fKoiALJ1VCeq/yCbR/ZOCbfy54hHVnJ0gOjFlYiGsc+P31BRzWuPLzjzWsWJes7xg7ibu2dVDA0g0bi3fj33v3QYIPt/Cl9fyA5sz6iJaOgM0P/12/Pz7M5Q+shaTP1IWpuP6kK+ywPD/RneV6RZLhMhWRNgfrKw3ZDZ9ZZIi5Rx+3MjPYRw0DtiQkIy4m6lSG9xfhREHBkmfup7XEesaROCWxmBbIupDgBJvj6fwNpoHCNvMQxsn0jfR8TJmeUFvGJhSU+24Vz/++LXSHBs7ucNMTzRFRe5bQnu/cboHoeirwoX5aClH6WC+ddtim03JbSR5VELIbcTVMWWmPnYoYik= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 Tue Dec 10 22:02: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: 13902182 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A943CE7717F for ; Tue, 10 Dec 2024 22:03:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1B6926B00AA; Tue, 10 Dec 2024 17:02:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F11B6B00A7; Tue, 10 Dec 2024 17:02:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D999A8D001E; Tue, 10 Dec 2024 17:02:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B23E28D001C for ; Tue, 10 Dec 2024 17:02:50 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 645AF1C7BF9 for ; Tue, 10 Dec 2024 22:02:50 +0000 (UTC) X-FDA: 82880423976.27.3C2B56D Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf08.hostedemail.com (Postfix) with ESMTP id C7160160006 for ; Tue, 10 Dec 2024 22:02:33 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b="e/J9gwCA"; spf=pass (imf08.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868147; a=rsa-sha256; cv=none; b=dPTeagQ/son5ulVHIwmz56gaAae9ltlgWYT4dieZkrEx+q3xa6v3ihwO0Dqy0FYuapwSSr dmJP5peNJHyZu1Sx47KWA2x5rToyFPYdvU0xuvwMOiLrSKA/Q3VpXvHjUJYXlJS+6fP5Sw OEFwDbrcO1q+17onAobDp7ON1xFtuh8= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b="e/J9gwCA"; spf=pass (imf08.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868147; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=RbQWNnMSFMFriUk4NuHYTwiGcsEx+EnrYdZ9JaogvX4=; b=8McIW51PBlpTuVTP5qre6dy1yfAb1UlS12Q0yzg9E1sbWpxz1gMAgIl9EIALNIjSxOc2xJ ifh3tElrTLOhLLHhIdSBKvtywuSYUfLpr24FfzcT5mXBY6TNgcRatVBamdAV1vy0whPOK3 WIH8YsrqiKWJey8XkDWTacBBzlILAe4= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id C173C20ACD6E; Tue, 10 Dec 2024 14:02:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C173C20ACD6E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868159; bh=RbQWNnMSFMFriUk4NuHYTwiGcsEx+EnrYdZ9JaogvX4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=e/J9gwCA4uBKGknzsmiO3oet8slWv1kdiClhfZ9LTUvDcAr8km71ONqn/wjRdmpri 4EyHjbbYG4CKX/8T2eN5ATCPWVrLNipH5jKYYefAMdH+qlSBTJn1LIV6HX/UxzfdGn 9DHlxQpHUKnw1xm9c/b/XukYCVTGP1/9SF9qgehM= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:49 +0000 Subject: [PATCH v3 18/19] livepatch: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-18-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Queue-Id: C7160160006 X-Stat-Signature: qarosbsu5g3hc9ab7dnemj3p388w6imu X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1733868153-658113 X-HE-Meta: U2FsdGVkX18R0mCVgRFzFfYWyPDZ6PCRsd4vplkvVnO5q2mUhqLab7KiT0fV9waQ/9hLEmE8ch2ZUsrOxMjlHF5gOc7NJl8zNRhdB3ZbhY0bO/8/UAwyCNnAtdybiSoKx1RUFD9AqAVd41fX0/zYBK6uxg/2yCdh/l49Cdoc06ZvIsepGSzO/mjMkWdi3puH6ZQ8+nPz+Im7Xp+yzTYUH/68qRd0D3LQJLFsbtTWvcuLnNqJUQiyzMtfhnGglWVBaCq2TXnNALkN4PV0y+aURC63mHmb+VkT0HO9xFnC+9xs2Mt0aOdC1kitwMycDvPn8ADK9XgOVIdMDE+KR6VYrGOysTInCM0PZdA6On/nGOz3RhttSDuU3QUnH36S938rTSdPeKQy/ZFTuIEVEwv78ud7gcqm6t2HWXEb/KCrj3vuLZJGOyTW8S1Un0oXNgQVEJ0ErSOv/zNm+vJttKTLhYhxTR/sD21gYVHiLH78MtcjoRDrRW5KaR0B/R3+sAD2ADYM5+1vQ5MWAzG/RyZbGQl+Bw0vNLHCt2qzubcTceTx7+nmDcbpXkcr1NhKUtq35eisScfFJ/aCmNjXibfVcbQEtw1mzSpeBj2DYESQhO//XOInLWZ+Y1UsUECz6iFGRClCb6AzmHU+bXItU3TqGm5X9N2E6icWhP7P7ZzYwfibFngRuzwxRmzBcrfaug1lRwMaES38Flr520z7uiFSWuvpe8jc7Ra4iW2FRw0vypbrld7MaGd2UJ05itpTrKh8eDLbkj+vT0u8baZ37gcKQ9whCSjlaqIKpBF/gT4l7JAnS0fWcfcP0SFkRiOjk3ADDf2aP5z9Wv4TUTgjxkkYGceXyDvMxO2HvdUufYm81Knc08UJ/bTZ090pC3igYWty/UQQ+yBRgTBlMygGY3mWj+/18HIdX6BXD+aVw6SmlAnJqlJUR+YBV4VSqaoHyp4akRAowj4fShWlpQmE1R0 aCNzbP43 kzpKZmgJnGZUM7ZA+Bl1cz7Wi6cb6X0tAiHcTsizWVqeY91eWqCsSeZH0X/z8E6M0CQeOS3y58Pne2PSqmsWq8t5jmOAKRiqrnEGchEmsD7qaaRZ/JfXMzBUNn8GVwZXxHWzVR1ftqu+yU2xhQU2hm+DLjiQApQPcpdx/7hMpQ/Dvi8mKDIOVA2//1Hr3relbxDJ5jijZY7keasU6KayA5y5RgPE5BBLomu7/IV8qYrNkLQeVViaGtPlgFCvux86FdHeN4AlWyWAFTx4mnVSDoVOGoqY0CmhiN9thqQfFXPTqitgLlNhNzrN+D7YGMWI63krQfP6Q/Xoj1FmaL9Zhs9Kn4z294b8Nwkvy7LcpG8JcrDlkHGc5H/WLy6uepyvagVjH9+EE6OgM04y0R7GIVKdyi8EjNWbER+XKEFTIcWnA8TQ= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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 | 3 +-- samples/livepatch/livepatch-shadow-fix1.c | 3 +-- samples/livepatch/livepatch-shadow-mod.c | 15 +++++---------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/samples/livepatch/livepatch-callbacks-busymod.c b/samples/livepatch/livepatch-callbacks-busymod.c index 378e2d40271a9717d09eff51d3d3612c679736fc..69105596e72e6826aa2815cb2599eea56a0055ba 100644 --- a/samples/livepatch/livepatch-callbacks-busymod.c +++ b/samples/livepatch/livepatch-callbacks-busymod.c @@ -44,8 +44,7 @@ static void busymod_work_func(struct work_struct *work) static int livepatch_callbacks_mod_init(void) { pr_info("%s\n", __func__); - schedule_delayed_work(&work, - msecs_to_jiffies(1000 * 0)); + schedule_delayed_work(&work, 0); return 0; } diff --git a/samples/livepatch/livepatch-shadow-fix1.c b/samples/livepatch/livepatch-shadow-fix1.c index 6701641bf12d454a770e49abeeb0dea92560e55e..f3f153895d6ce751fc91ae1224d91b220cba3e37 100644 --- a/samples/livepatch/livepatch-shadow-fix1.c +++ b/samples/livepatch/livepatch-shadow-fix1.c @@ -72,8 +72,7 @@ static struct dummy *livepatch_fix1_dummy_alloc(void) if (!d) return NULL; - d->jiffies_expire = jiffies + - msecs_to_jiffies(1000 * EXPIRE_PERIOD); + d->jiffies_expire = jiffies + 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..5d83ad5a8118dbbac897dfcbb92e6d5f399d1dc3 100644 --- a/samples/livepatch/livepatch-shadow-mod.c +++ b/samples/livepatch/livepatch-shadow-mod.c @@ -101,8 +101,7 @@ static __used noinline struct dummy *dummy_alloc(void) if (!d) return NULL; - d->jiffies_expire = jiffies + - msecs_to_jiffies(1000 * EXPIRE_PERIOD); + d->jiffies_expire = jiffies + secs_to_jiffies(EXPIRE_PERIOD); /* Oops, forgot to save leak! */ leak = kzalloc(sizeof(*leak), GFP_KERNEL); @@ -152,8 +151,7 @@ static void alloc_work_func(struct work_struct *work) list_add(&d->list, &dummy_list); mutex_unlock(&dummy_list_mutex); - schedule_delayed_work(&alloc_dwork, - msecs_to_jiffies(1000 * ALLOC_PERIOD)); + schedule_delayed_work(&alloc_dwork, secs_to_jiffies(ALLOC_PERIOD)); } /* @@ -184,16 +182,13 @@ 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)); + schedule_delayed_work(&cleanup_dwork, secs_to_jiffies(CLEANUP_PERIOD)); } static int livepatch_shadow_mod_init(void) { - schedule_delayed_work(&alloc_dwork, - msecs_to_jiffies(1000 * ALLOC_PERIOD)); - schedule_delayed_work(&cleanup_dwork, - msecs_to_jiffies(1000 * CLEANUP_PERIOD)); + schedule_delayed_work(&alloc_dwork, secs_to_jiffies(ALLOC_PERIOD)); + schedule_delayed_work(&cleanup_dwork, secs_to_jiffies(CLEANUP_PERIOD)); return 0; } From patchwork Tue Dec 10 22:02: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: 13902185 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91F20E7717F for ; Tue, 10 Dec 2024 22:03:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A80D06B009B; Tue, 10 Dec 2024 17:02:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 83FEC8D0017; Tue, 10 Dec 2024 17:02:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 621BA6B00B1; Tue, 10 Dec 2024 17:02:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 3513F6B009B for ; Tue, 10 Dec 2024 17:02:51 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E9080140B99 for ; Tue, 10 Dec 2024 22:02:50 +0000 (UTC) X-FDA: 82880424270.26.378E41D Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf15.hostedemail.com (Postfix) with ESMTP id CC312A0006 for ; Tue, 10 Dec 2024 22:02:25 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=Vt8vx6jK; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf15.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868148; a=rsa-sha256; cv=none; b=znNHI8EgZ977t6VuwxS26nnJKzjVk5zjY6Ty/wNrLo8cQBUgEdiyo96NWb+SeQ5jm0xc8S ayQiJETAdAdX8n0AYL5CqB2RSnEZVlmVdX1UOqX8YXL/8wFz87Glm06WZsZ2bcqe3djGIX CFlwk1M/PBTT4kFrgiDN8d2YOpwpCvc= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=Vt8vx6jK; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf15.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868148; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zXBBaQqpACacMQS0Kj7gcrwl6nw/WBuJMa6i20JWtiI=; b=H6xRvnS2zKJgaMbpPBOkATUNJSsRqj4vDRLCzmFtqbky8qay+Qk9Ox/HHVF/x/7V2ETzSX znZTcmR37K3LuyvgbhbT+EuT+VX06aRC8IZi87ZfiBjnVC8/I9acNJqeoxjcR5vOwuRV7M wD/PgRiXK0jR7S3beaxvCGLKPsVv6mk= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id F1ABA20ACD6F; Tue, 10 Dec 2024 14:02:39 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F1ABA20ACD6F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868160; bh=zXBBaQqpACacMQS0Kj7gcrwl6nw/WBuJMa6i20JWtiI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Vt8vx6jKTs+Ctim/qcZbBmxzvKglLplBaf8u3Ss1TuSPMlqyDk6c0iiPlA+LzR+m0 YPZ/Qdi+1XcZwtu1UmEnzASc3HPTGQ/HgM/xmF7CmRGYf/aXx12mOKI6ka1aNTAUbz /gGdJ/+VOZh0/gOcfBkHqPOaIC1SiZYddw+BwdBw= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:50 +0000 Subject: [PATCH v3 19/19] ALSA: line6: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-19-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@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 , 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, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Stat-Signature: rwyhhyez9rp4fpfx18iqtwetx7b6uhja X-Rspam-User: X-Rspamd-Queue-Id: CC312A0006 X-Rspamd-Server: rspam08 X-HE-Tag: 1733868145-489867 X-HE-Meta: U2FsdGVkX1+7ly45wzADxi+XE4kBSODPfqkeDdBHjig0wDTIFQnZVUpGEp63DnIyrHV23Wcn73PaqWstb7I8Zj4ZM+AE25dZMqBQc4RmDo0k/cuF7DlIzVvdF1zGSBiYatxnps84oXPKpBCFu0Y6Biuh92HvDi40RCymqAyFSHbqGjin2joavCIF0Xr4h0zKrmnLCrl2cDb6kDvhM81yl2H4J6ZF6H2TOsvUA41v5GDHK/jDVKItZed/FwPvuHIzHXcGmBNmQIW8sRObf9Kws3BSVokIt5ETgOjW0m7fMR+wNHAPmZk4ccSFP+gLwq7flprLNDU72xSbGE3MuYq4whoa36kXSbad0eD/kQblYgdDY7EaRJ5fMlHVyr8iByXCPN9tPqulbMwBi/n6lPDPoWKPkrPP8l7Lx9x/p+pnTddhlBeyPR7w61xp0eGo3GsuNuHkRcP2GMicvpdzvdNFwbdxYfPymAO/sJ0sHLOY6rW4PH9nEj54Dk8FlD5ZCWuLgaQjna+L3nOA3m62e+iVSkyAL3Xf35g8CRjESy5feRO5x0mwJv3cxwJmKUW8z94yW4EwolzB/yF4ofwcQ7+V8AnM+Icdw128KSgVRxCHgFSpVHwRGnv3S4csW8VeTtPxOMX3Ku8tUXCxB9i3kLZbKn+eE18BvHLLZp8Qa7mFxIvDtQeR3UOZgvMjk30xMHWZs1Bx+oh/0bHe4CmtRFuth0638MqEPUkeTxfdwgap4LPK9+j5L6Tqg7AAh39fj5ds/2S0/ZaTP+iN7V5NmkHQCxKvAFoLylITMZoaegtLZu1e5BE2vabV9vlAWsCnL+PJpWMNrWg9bAlNtX9TRSsEhNwC+agqSexWgVtfccUH/qH1JvkExulzsnXAaiKVSeudH1aNxM5H5dlltGBdkiZtBI/6WY/rnRU4N1ZOpR/0G9EQ8ZHsJNab8DrsPyYK/DtQDQq5dab1oavGeNx1tWR 38tQAXtB M32tWE5LUy52PV+G2lEs02UoOJZAmByTxfg6nTwyCt3GKLHlATuicBp+QVj+x3DONuicovHmPRaniTfqf5hoa2P3RFIWsOXVUjpWtmZyEQS95JNOXt+u/+UfnCTICht7sl34pOxWzFWJNXarheaVrDammozwAfIHj4+iZnc8Q5k8RvpQ+3jPXrxIcaCBr2vz/eoBld+mpfV7MW8HRiRGpWb8COhQzXuuA97EHso1kmMoLcKCIDiSbJpiwwVFzJ7SxNiXvjjq0oQQy2H9bT+FmMezJjezSGPg5pldAD8DMFhZeB5tEfGZb/9ZTvD7yZ2u/EM0OHvZwtDsOHt9O9v/IBq47YHQXmmFvrz6QCIX4LM8fyStxAM+LCmaZ7kM1nQTFnJvv/VB7Ec8ROw4kV60GtSAd7UFyvZe+7P4VvhXN8lV/9mA= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci 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; }