From patchwork Fri Nov 15 21:22:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876900 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 B7098D68BDD for ; Fri, 15 Nov 2024 21:22:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2C1D76B0088; Fri, 15 Nov 2024 16:22:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 21FB66B0093; Fri, 15 Nov 2024 16:22:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 072416B0092; Fri, 15 Nov 2024 16:22:45 -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 D1CCA6B0083 for ; Fri, 15 Nov 2024 16:22:45 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 835EF802B9 for ; Fri, 15 Nov 2024 21:22:45 +0000 (UTC) X-FDA: 82789601832.19.9C448CD Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf03.hostedemail.com (Postfix) with ESMTP id A98C42001E for ; Fri, 15 Nov 2024 21:22:22 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=TpPSBC6Q; spf=pass (imf03.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=1731705706; 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=Q64Lap8gGilYnZS8wBYuXVtg6CkDWFgIDR5hpRb/qKY=; b=dzcocibgY5ivEZDZEdtssJ1WXGAF+TATDqRvGnOhvjxC1HTAgctrPGPnEn3H2cT4Pdf6ff tdedYd450VaiLYrV/9je49BA6e9Y2J6P9ayKYkfV+2K6ie4wKdBS1LWrGFPeZVPDjqtP9j anzAgg8fK63kfGbN8+aoE+kG2Ask3q4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705706; a=rsa-sha256; cv=none; b=kfbY+Qsmd6sbgEov5qvaeGn1/q36KI8T852gvF3OtOFy8ZWP5YfulwbB79XY6NdFZoYe8b r8ZXU2NSSSCUlQkgLPQ+NfllQ3+iy23MwJxlzEBafIUX5hsc9REflp77MFkNx1ZOBYl0lc WbNgmNKCTHQ2LHKB3axADrqo+8ve3Ew= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=TpPSBC6Q; spf=pass (imf03.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 1682D206BCE4; Fri, 15 Nov 2024 13:22:42 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1682D206BCE4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705762; bh=Q64Lap8gGilYnZS8wBYuXVtg6CkDWFgIDR5hpRb/qKY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=TpPSBC6Q0pyCMIPKcOfsvZX/wWIHu4+ejmKY8xw+0GecDvIAUfgwshz01AoOkZ0WD k4gHIei/egZSo7W0NlMAlHYHatQ5bzRsbZtX1NOQvIcE9aFKMDcUHtqmglM484AIGB /3Fdhfw7EN1qT/zCvUp8095p9P9VmicZ+TZgDM0I= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:31 +0000 Subject: [PATCH 01/22] netfilter: conntrack: Cleanup timeout definitions MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-1-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Stat-Signature: whtajnegtxisooce4mcwfepqgb3a16cz X-Rspam-User: X-Rspamd-Queue-Id: A98C42001E X-Rspamd-Server: rspam02 X-HE-Tag: 1731705742-551183 X-HE-Meta: U2FsdGVkX19q2I69/CgBZURD84WDOQMMinhf9nn1T9GZpYFOCXpaHyD/rp5PYHQi8ezlOOrkVHY7Fe9U2Ad44u2px7LQVO/FKk6cRicVcIFg2jYZ7UlnyNxEcEOeYL2Dn4dFst3YjNiD2h1/H5lMRALH0o86W48gd8YdEi9Q1VGDeELt44FHnUIAeDYq8OgVje1ubR6fbRT0HqU2VJs53OvlVjjU+hN3QfNwERAKiho1GnFxqsndyFz5aFtjAMLb+mJlGRE3Exz5ny1cdEugEz0D4SyLv1B3e3kigz2HhyR/KSbeJtmTlUk/5zgTHb9G7ZpsRBLFbUCH6JP+ZrIaynbecPQF3T750rBaMX9yXCFb+1EtbRjWKbInaRZA6vNbpJd2xaTs3OncGPaMyv2W4TthgEe1BAghMXpQxfnu388Gyx6Gq1DMqAHvlWCJLK7HfnwK5by6QEmDXdOJ7OUqq1ftZ7ZGGs8+NR6xfXH2PG1GxnXNpDi+BQASyVPYW1bFBGIRT+3IjiQ9JfuVV1/Gw/gpVgrIChiStgQWcDxw4e3smI7zaxYPVg51KZi5R801JkJetKRM/ZjdvfOInTT2xYR7uZrNXg9xU/+pHkWEGLX/zwVRbu9GqDNzbqNrt4q0IUoeui3lmUTZZhleTInMAsug+3BEiQIEmuvDHerblPL0bMmUeEz/JVq89L5SxhiNlN0FBZxBEJoq94ywp4KENFz6Krg+7hwDl58uOShDwmbpsaJYLy2/6Xu0XdRENme5zqp3y09GTDcknQ3OXY93WbQXWGCJD2ZvlyRQwH5fwv0DDlHLyfMsztGVF2XDCh1WsVyhHYvF7Ps1kThyg41x044pulOozOhIwscBKDXegBmj7ZPkpGIlWnujOwg1R9pJZ2ewd9YEzIpq9IRSvxw34W4w5CF7qyNH17JihjIwJprL/uWNz5LPERLl6R56vCUatMuFiSE42mB9OqeAXr4 mMEAY6NU BxEJynFr/Fy3ol7TCEXTZm3h7OyXG3xD4X5GKxwpMae4oz+mWQOB4yE/C0nqoqqKIjgTuADEPs9RzBAdcpfh/jkxXzvUaW+0eJGapINa3mfDN5i5XTzsCR9/7EWBxd1jYeQ2Wb8qkpdkiLIB2QsEzFokp8/lHdtnNQwtUtIixEkDWT9YzigCFZ9ibobisWdrk/wr/p0Qz0V0YV8lBiH1Lb+ricco06Rv7h3YGsEw5MwBk4cg7xxouvyPLRYRKgc7k6KI+wKz0SL4zKA1n0lhRSArJsRluovuHkH5ouNBaP6kwarvyiuUxaqkS36wP7SodE7jmU+JZVh3Il8mGVcbIbC4BUMDRUpOnmtvTSIZOvip88lku+lXQoK0mMTXjY9KuB5QKMwSFu0Zeyig= 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..6c95ac96fa42a39acafb5b88a7cf8898010e911c 100644 --- a/net/netfilter/nf_conntrack_proto_sctp.c +++ b/net/netfilter/nf_conntrack_proto_sctp.c @@ -39,20 +39,15 @@ static const char *const sctp_conntrack_names[] = { [SCTP_CONNTRACK_HEARTBEAT_SENT] = "HEARTBEAT_SENT", }; -#define SECS * HZ -#define MINS * 60 SECS -#define HOURS * 60 MINS -#define DAYS * 24 HOURS - static const unsigned int sctp_timeouts[SCTP_CONNTRACK_MAX] = { - [SCTP_CONNTRACK_CLOSED] = 10 SECS, - [SCTP_CONNTRACK_COOKIE_WAIT] = 3 SECS, - [SCTP_CONNTRACK_COOKIE_ECHOED] = 3 SECS, - [SCTP_CONNTRACK_ESTABLISHED] = 210 SECS, - [SCTP_CONNTRACK_SHUTDOWN_SENT] = 3 SECS, - [SCTP_CONNTRACK_SHUTDOWN_RECD] = 3 SECS, - [SCTP_CONNTRACK_SHUTDOWN_ACK_SENT] = 3 SECS, - [SCTP_CONNTRACK_HEARTBEAT_SENT] = 30 SECS, + [SCTP_CONNTRACK_CLOSED] = secs_to_jiffies(10), + [SCTP_CONNTRACK_COOKIE_WAIT] = secs_to_jiffies(3), + [SCTP_CONNTRACK_COOKIE_ECHOED] = secs_to_jiffies(3), + [SCTP_CONNTRACK_ESTABLISHED] = secs_to_jiffies(210), + [SCTP_CONNTRACK_SHUTDOWN_SENT] = secs_to_jiffies(3), + [SCTP_CONNTRACK_SHUTDOWN_RECD] = secs_to_jiffies(3), + [SCTP_CONNTRACK_SHUTDOWN_ACK_SENT] = secs_to_jiffies(3), + [SCTP_CONNTRACK_HEARTBEAT_SENT] = secs_to_jiffies(3), }; #define SCTP_FLAG_HEARTBEAT_VTAG_FAILED 1 From patchwork Fri Nov 15 21:22:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876902 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 E69FBD68BD9 for ; Fri, 15 Nov 2024 21:22:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 91ED86B008A; Fri, 15 Nov 2024 16:22:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7AE246B0093; Fri, 15 Nov 2024 16:22:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 468866B008A; Fri, 15 Nov 2024 16:22:46 -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 06FAF6B008C for ; Fri, 15 Nov 2024 16:22:45 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 87CDD1403A8 for ; Fri, 15 Nov 2024 21:22:45 +0000 (UTC) X-FDA: 82789602924.18.4BFE479 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf12.hostedemail.com (Postfix) with ESMTP id 2864A4000A for ; Fri, 15 Nov 2024 21:22:23 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=Oh5o3W+Q; dmarc=pass (policy=none) header.from=linux.microsoft.com; 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705699; a=rsa-sha256; cv=none; b=1JAntNVa6pM32nHcs9ebTxYswegtCiZ2DbZQE8Vdt6kry+aOgqiW5UYkDHZMnLv5bIfXU1 zRTqe3BGJ5sX/KZA+qTC4EOUmre++svbDfKNdhWYO4LqqKDq1+2xL1dDbmGcfifMDVDp5m jPg7yBc7qSY3b7BXjdkf84PzzEFpctQ= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=Oh5o3W+Q; dmarc=pass (policy=none) header.from=linux.microsoft.com; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731705699; 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=mjGmNlPTDeXtBIVnBruZVxnncRcSbkg/ti9M5w2fu78=; b=21lEs3pYwzD+ZmEd/aZRUhL8cX/74F+4iR+NnC2W93NWyUrNVyJ0AJWijh+R9Po5jlgunm JaeMVXqNTIndH5FOuyF4WgKCYJnQpP+CyWtNn/pKg/hVhbVaZtyNhhEYnoXBStMDR+eU0o RLLpe2zDxx2tvJ92nCVDU3eRvN0cpr8= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 49A20206BCE5; Fri, 15 Nov 2024 13:22:42 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 49A20206BCE5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705762; bh=mjGmNlPTDeXtBIVnBruZVxnncRcSbkg/ti9M5w2fu78=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Oh5o3W+QiJRTTPFI9dpb9A1AWSAOLDDOB8sqUPea54Qx6kUKHNmkqaArwACWjQxKB D55Uc4+WAewzxsbEk8laNjMjSMPfVawB+Zi45VRw0skgegejDy9IgBYr/0jKgvvqvH DeGMefeFQkwrmneQNUkhORZAjpQMci1rsg92zUBA= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:32 +0000 Subject: [PATCH 02/22] coccinelle: misc: Add secs_to_jiffies script MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-2-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspam-User: X-Rspamd-Queue-Id: 2864A4000A X-Rspamd-Server: rspam01 X-Stat-Signature: ckutopi33mfy8fmw5ms1rxnz136dasrz X-HE-Tag: 1731705743-166467 X-HE-Meta: U2FsdGVkX1/b6xqpE4AtVoVMoD8cJkygRz1EfSpjMOPI467Wm8ixtcp4e49Bkw05eM5PRddzLZSv9wSZDk8EmZ5AuYEy0sbH5z+njY+F8/mT2Iz2flF62N9KtRTNLnmz/tJMz0vxX/c+q5MaFAhJsG1KsuAxyrwt6HO7mB5bliMKHSSmvPEoKZ85tVf4+xr0kDCG8qzF2vYSeuA9yImAFqWhb4S5dwQIKuT1MKmnfA6Ah9MpglbBVqHWEcHOb/spWP+XiTmHV6kviiTjEgQh7hrjsp4U9p62/CR1VOA7up7u57I90dxtDSRsmq5xg+PUDT6L6z5D7hwls5ztpoovmB4oMfmJSrRf/gmkvmVo1OYDHVDrEheaREOLkjbhLJPeBFK/2jLm61u4dlwvPRXtsPyyerAA5jWZVgLLDxaBi87VTxUvkbaC/zUyT6fQsSNNqpo4zbcdbDJtQgBHv9CL44SavEpwaQdl9rDP/051CB+f7ZM078ggj5aBOzlxyFAxjW6EcV3dx31J3cbmWm2O9/QCfraadVGmT4kCS+jNXOm8xL6DsVClJNQxDtIyXZoGYM1X9npkaEF88sfHGGHVPuynNMOJyDSEl29wv8igyFdCX66qjFHmXyx0pppSJzyrcMaFyG+F+2YfiGhNUFSQQLp75I66bsKXMGy/CsLH9sM9lrwJRtGSmCImt79zWOPWxCj/QLggANsgaM89Gj26sVEiKp8IWGvbsDHIg/bqkIXowEdAZxhexfrLefUG5k+5ChdMo68Au1r+WfYgDaMIgh/DZBuA5Wr/K9WWm3MRfygGZG52fClE/GVT3UOke8i9SDZXPH5spktNKNqjH4UR3b+03UBxy18HUw2u3AZw7CnNRIKz322yJYwB5MXJETwCpmgCZjAPRc+TGeyHCJP5q0ZRFykUmBXnTx8rCNKQKlye80km9uqXg7eLGa6N1sHSULn4hnxmsbQ+iK7Tv14 dl7iR9lJ 1tYUVqaOnxtwReCoyObvL/jc/MiO/yZGbIBHTyENaQAlILjZvQgyHzYzVR0vfzPUiP9FgKzg/6wGQfw7ohjmQ3R0iyhhlw3KxqO8nDAtOqfTbrAM4HebjVFIAPv0+/e+qjjeLc58pyQd6w6/1/CiVcKJS/KO09dUTqY6vkjWF9xZxmaBQD8Wt28Yeb/Rk0CbhTGvrUkov62EXCFYlZlEyO/ZFuHfqc9O3Zo+PVZ2JCg6pomiqVI4s145Yp/ts/8OoF5mW/jL5UxXNyzsj5egvueGadOD9jAnZsKvThca9nWaOZRlXm7P/1vquPU01/zT+H7FUq/Gwv9ShBSPDeb4vN+6i1HrknY2/MDl4kYaMsbpoT1t7ZMNbEv/Is8geFvnsIEyfIy4dHBsC5TYEY7sP12xpYe9vmMvMga9a3d0g/y0J5XfASiyJ1kqSNQ== 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: Suggested-by: Anna-Maria Behnsen Signed-off-by: Easwar Hariharan --- scripts/coccinelle/misc/secs_to_jiffies.cocci | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/scripts/coccinelle/misc/secs_to_jiffies.cocci b/scripts/coccinelle/misc/secs_to_jiffies.cocci new file mode 100644 index 0000000000000000000000000000000000000000..af762b1c0aac8f044f21150bfaafd9efc834ee87 --- /dev/null +++ b/scripts/coccinelle/misc/secs_to_jiffies.cocci @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-only +/// +/// Find usages of: +/// - msecs_to_jiffies(value*1000) +/// - msecs_to_jiffies(value*MSEC_PER_SEC) +/// +// Confidence: High +// Copyright: (C) 2024 Easwar Hariharan Microsoft +// +// Keywords: secs, seconds, jiffies +// + +@@ constant C; @@ + +- msecs_to_jiffies(C * 1000) ++ secs_to_jiffies(C) + +@@ constant C; @@ + +- msecs_to_jiffies(C * MSEC_PER_SEC) ++ secs_to_jiffies(C) From patchwork Fri Nov 15 21:22:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876903 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 9CAD9D68BDD for ; Fri, 15 Nov 2024 21:22:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 52E8D6B008C; Fri, 15 Nov 2024 16:22:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4DE076B0092; Fri, 15 Nov 2024 16:22:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 309E26B0093; Fri, 15 Nov 2024 16:22:47 -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 0DB5D6B008C for ; Fri, 15 Nov 2024 16:22:47 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id C3EFB1C6112 for ; Fri, 15 Nov 2024 21:22:46 +0000 (UTC) X-FDA: 82789601580.07.F20E6D5 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf04.hostedemail.com (Postfix) with ESMTP id 0A53140016 for ; Fri, 15 Nov 2024 21:21:46 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=m+WMW1w9; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf04.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=1731705700; a=rsa-sha256; cv=none; b=lkjvHpbuxo/cr+afVeUt6WTAiSKyb6OUq8HLUEXXF/8lr/1Ji0W8Wjf0wGkrtgOC+AYvZK nBK5BJhVKA9RGs02eSLFym9SWc7TiNSU4CAgnv90S5/9w42vVplb1zFjiPD7Co9GHGEmgO ZbYEayynzMpED61TI1Gg3F900d+wAD4= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=m+WMW1w9; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf04.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=1731705700; 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=3U0Zq8t5krsiKxal+ZZuXq1UdnH4Ui7697JSzYEOhjI=; b=ASaPhSs2SYBYra+aaYsm/oZPaTE11Jvm572FT7vIpoz1Dq5wPeP1VFOmExvvawXGDD/1KV iacOkEcuHCrZgitQZGds4qNp9WM1qvRJj94tZn21LNjbIjC9QnEa4DQVbnecOKsnikuVbS SS62ZL0V57wSdUn118g1ns0hqGPmXsU= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 7A864206BCE6; Fri, 15 Nov 2024 13:22:42 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7A864206BCE6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705762; bh=3U0Zq8t5krsiKxal+ZZuXq1UdnH4Ui7697JSzYEOhjI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=m+WMW1w9+VciYFFrFZA0mxoPGvOfjrhYGrAVRbiO/Z38FXEyCYrwD61KeWUrbI1co ciJpLEmJVGwRKy8PLvAHCagPIhXXgMkeOPvwDiMFvy84ueU3pKKi0uGJZ6fL3Jn5Hz Ra5qi3c9a5aFZzpjfWBaC+oXk3VwB4O9Td0lHhlo= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:33 +0000 Subject: [PATCH 03/22] arm: pxa: Convert timeouts to use secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-3-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspam-User: X-Rspamd-Queue-Id: 0A53140016 X-Rspamd-Server: rspam11 X-Stat-Signature: 6tmp86rx6xpbb5gk19q55b1woy7jwmpm X-HE-Tag: 1731705706-748057 X-HE-Meta: U2FsdGVkX181FPjXhy1TCx6u0Yy/TtjWmzLajtv4vJ6OfaWyzOsO3R+VKVLmC8OoCswqaPdO7QtruI/nqcM0LU1o0AKQXabdVOX9XnnjEcfAOVQHjm/Wb82ePzPE8//dHvyK12lPHk5FAcre8Xw4aDqwzksf/JaKoac2jyVQc2F70J0COQiHl1WezlqMBvXbKyfJAxEYop2/GbgnY3NXOLAFlSqoSxEk0NsdtHQdLNJcgKMZs8kRREC1BocvRYFWhIFc5Mdankymt8LYtmc4i1EoI3MPkUu/s1bEsp6fHgypd2MNRf9TNz05rdqrzPEIQ0OocPoWmAz4LZc7Ho/t7qykIwIx+t6nbTNBDoQ3OpIWr2ekNFOTjgICZPVvTVsYTfWSLqqz/gzU9Vj/vXLtLywr4VERYOrbjLJ4z8Jvm9TJRiXPf2M3C+S77ziHHHgAc/J4oStNgHD/oVh9iFH/ScRDlpWQ+75ZFLvX3PjD9pZIJe8zpuShod4zHzQx4SBOR1dBayYwkaUQsV1XUFu68gcTVRrJSJOot22Ov3dT2pNYJSg9hfungqfFc61hS38pi6OQ3CXKGhMuUDyiSV2b1rHEPpyYxoFvnudxDINi/YbGAOLJnl+LALZg3Ps+JuYSu/vhGJHGJJAO7GINaqbGcXby1CNcJ7wIV6WXOAUx0UoOQGh7O4fTUezTu9dtpKViZiduEpAY9srACxTXVMrkDlURA/LSxH9YlrkJ16873tUuHSdbJfU/tn2zJ7x2uflSkBJNJorNjpTogaOuAkjdySM1NnxiuzoMQZdx3JBP656W2sG58oEMIhOvu1aqIqX6JU+8pbmYbg1quMHoAM6720tyZeWooRyCiegcyGsQwK2ywzPT+Aks1SfP8JCGPML8jCZPzfkADNnbMXZ85nO/EsKN6IRhU+Qt0MIT2eVPhAxViPZ1+ycMBHByS3IctigZ+BBgtJ9MWtc/E52ygfo bq2euNmC vr0eCCe/Qy+8Vf3eZVHA9RehN+99Dz+/Krzt8QULV+iLQ7q9+geFoa39qkrBjJZJOyIcdednqtq78AUB5pjZU+X6kt8Pt+4V8EvfUL8j5cdJNMguV1/a31+JKxgH0Aw93XaXrmlWH5MrWNEq9CFaQK8eU8rniwIRLzKBSv9TaMhQqZk2EHqAV+P1lQpiZlglRGPexqjEx/8wwadU92Y946jnKpKY5bqCVM1xCQfZg3BYZRTSrtubH/2nsOKhNN26GFyU8RmHIiaBxOiC7bHvvYoycYNxEkwbh0bsvlIdNUnS+r0HiAKHqfQyQLua6FOMceTYxBcNuHayO9WYZati6jbs8OZU5YfDQ9X8ijbFr+L21S/QS9FLt4iCR7vLqG8b/BYMChyaTaQP7BqJ46spnvw2Q1ja69QeL2u+EnTK8/YSxVBJeMtyhrWOFgg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- arch/arm/mach-pxa/sharpsl_pm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 72fa2e3fd35318e5a63c121ed7990a56a56b134c..bbbd06bc79bbb94fb258562e5a382acaf3c277b3 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c @@ -31,9 +31,9 @@ /* * Constants */ -#define SHARPSL_CHARGE_ON_TIME_INTERVAL (msecs_to_jiffies(1*60*1000)) /* 1 min */ -#define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */ -#define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */ +#define SHARPSL_CHARGE_ON_TIME_INTERVAL (secs_to_jiffies(60)) /* 1 min */ +#define SHARPSL_CHARGE_FINISH_TIME (secs_to_jiffies(10*60)) /* 10 min */ +#define SHARPSL_BATCHK_TIME (secs_to_jiffies(15)) /* 15 sec */ #define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ #define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */ From patchwork Fri Nov 15 21:22:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876904 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 F06DED68BD8 for ; Fri, 15 Nov 2024 21:22:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 099826B0092; Fri, 15 Nov 2024 16:22:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F408A6B0093; Fri, 15 Nov 2024 16:22:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CF4A46B0095; Fri, 15 Nov 2024 16:22: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 B0C816B0092 for ; Fri, 15 Nov 2024 16:22:47 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 74E8F120422 for ; Fri, 15 Nov 2024 21:22:47 +0000 (UTC) X-FDA: 82789602630.22.AB2C26D Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf21.hostedemail.com (Postfix) with ESMTP id CC5961C000E for ; Fri, 15 Nov 2024 21:21:18 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=jwtdE59v; 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=1731705701; a=rsa-sha256; cv=none; b=wFK7yv+9IQi/rCxzk3YxD5vYq9hkZc8A/36+1trYG+Lk82M+DKbxUCjRe1cYvTZHT3RZrU 7JeXbzsSXauKHo7YeDL8FS3r1Xr4KPx02APjHZOOs+rk77tOqvAmcev4ZpJrSisx7Q0OQl 43m76bqD5C5xf1WQQLp5809Qi99LWRM= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=jwtdE59v; 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=1731705701; 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=2qNmVTIUPIQHjxG6U+oz3oOJorUpDTvltiEua1kgDGM=; b=O1SUF9BOKE2FavumK0aNeWoGfmhGqJL+Q8Z6WkGxCUXRtVTAMqFySC9CCMfx/B4GiFOyrT C2qS3FmkFLTvoavdSQllPBuxvDoP5h1CY92pA2mNAsOtbFDQOVREp+3y3yrrEsHMX6sTL5 suRksHfE0+DY8h6QYVf0DXR8o54sTFU= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id ADD5A206BCE7; Fri, 15 Nov 2024 13:22:42 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com ADD5A206BCE7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705762; bh=2qNmVTIUPIQHjxG6U+oz3oOJorUpDTvltiEua1kgDGM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jwtdE59vuxdQNE0RiS/g1dZX+uqTWG/w9IblshEquJbSzhtkY3Zk6fbDpk+PaYqJ3 QDyNOhOWd9ZJoQqLoj3N42Lk4lBijUYlMVpBY8G/XYg13FKv7CiQTz5tjAvkJe5Ryj q0FRAVEgJKXl2OZRO71N5d2wqJQesfADXbZgbw84= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:34 +0000 Subject: [PATCH 04/22] s390: kernel: Convert timeouts to use secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-4-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspam-User: X-Rspamd-Queue-Id: CC5961C000E X-Rspamd-Server: rspam01 X-Stat-Signature: p5qzer8cfy5s781njdu5guhcu53z67w4 X-HE-Tag: 1731705678-662095 X-HE-Meta: U2FsdGVkX1/bT9W7xoyyIo3dBJfjYkjjy3O4AlHaobYNFSEwnur270tjB408l3ASMfVV6NHfcXplXP+gtdVVpzWncEbHiVu9bENY1C7LMv2K1r8MRY1AtwfgZv5VkmwIesGS3HmAQKQObPwHypspaDhfEgA+IYQKCeZ78Dx/cw6ZxBKPm4XvoNldUfmBi9iCHSrS/gdub16g/35tRlj9W1a4KpjtBwsg88cRvL3PVy2nLnaCTbn3/oi8ji9UFmFPZ7+T8bHHy1IX2xh72/Df9MpTbX3XfoohBLACa/aezxvgBNwAzY8YfLM69OL03nb4d9/75Tly75bYVBHAHU4P6rwz30w9SBH4Lhk1Q55853v0lsMWsNbFJKd2BG0g3ZUoWb2Mw7xuZLlqpj1msfE+A7C70PDxNPJZDvrM0gwwblhKnzKh1eALiI4CmGOzn8xubftDNFlw6Lyja0IwxwjqQBHuNGDnJA+iiRW8jN9O8FFjubpaGy4+3LRWURWYOu/tXFrm/Z/gQ8SOMkW12YvOne92TSsygfprESuu50MCfj1fdf0z05GhCdkOcHnlRkaPYhWlEjP4t7rVsJw2LmcvRfGhhLraj/1biseBvY53pWnLCNA5ePh04HZ4wDFSFkkvsvKcQTmqx87RzCPbnpOV51hDhPz9ShY6O9672djNwtUFzYfU4vaZjdH/PZgfSf3qtGm8i6esykwlXrXhJU2RNOZB+M6cbUnBtkLzuZeP+5qMRMZDHNREfN55leiz9ysD30ROWD1603l1bNwbOvdhVb/c2S7Kh0rilryrEBENNd9Q0+hZO43kUbLP47ptD0C89lZPHLpK3InLY8avQu/hI7WuIXdHxw4EGTZWxE92MhdjW9Km3dgTY59YuGveIkIKYO1uqmu1fjpV+92zgZJZ59F13p3p3YGXzchNmtNnd6P5RwJFaqnc2fEOwUaeNk3whsTgCtYkE2WR/VVjcno ofkjG/M1 fUE9Ofuf4GMi9ab9VTJO2M8QDvp404Q/Ng7DyMB+D4JHySU7VOR2T8I31mvN/Ecd9hFZcoqxFzXA4gA5FoBGvJSBQBLKxV2X1RMs+ydE0/ger/0cN/Mxt7TQS1x6oEclQzZWbzAnNY9I6rUihhjq8NS02E0uC5DZFOmzgy0iD+82oR4a3pU8RnKH5SnceXtl3JFV2JB15UiqwiQph52wNfRdbEGXx0H73RWlMWJIiehDIhi6N6Vubr8wAo2kG8487kRNR4Fph5IMmESB4qickU/VoDYUYkJp7zsJKMRKm4Dg47/P+Og5IkCswU02DBO0Jmf8ZA5SKQBSKZhcc6j5fn+Wu+VsBqEq0wA6lWhpIk3QT0OaTmZDy6VlJR8hIG70eOad8+DX5s9HIdb4FM5fwR1+8xtuO/CUS81vzTDvv4Pu1Xue/Ej1E7AZNCPbkx2xdGwz2 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- arch/s390/kernel/lgr.c | 3 ++- arch/s390/kernel/time.c | 4 ++-- arch/s390/kernel/topology.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/s390/kernel/lgr.c b/arch/s390/kernel/lgr.c index 6652e54cf3db9fbdd8cfb06f8a0dc1d4c05ae7d7..68021cb38574b122bbe3d9f70e9168305360017b 100644 --- a/arch/s390/kernel/lgr.c +++ b/arch/s390/kernel/lgr.c @@ -166,7 +166,8 @@ static struct timer_list lgr_timer; */ static void lgr_timer_set(void) { - mod_timer(&lgr_timer, jiffies + msecs_to_jiffies(LGR_TIMER_INTERVAL_SECS * MSEC_PER_SEC)); + mod_timer(&lgr_timer, + jiffies + secs_to_jiffies(LGR_TIMER_INTERVAL_SECS)); } /* diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index b713effe057967623f64da8297314fcc42ff1af2..e28c61d39d27c6e89f490e779ff674ba2fe21d3e 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -656,12 +656,12 @@ static void stp_check_leap(void) if (ret < 0) pr_err("failed to set leap second flags\n"); /* arm Timer to clear leap second flags */ - mod_timer(&stp_timer, jiffies + msecs_to_jiffies(14400 * MSEC_PER_SEC)); + mod_timer(&stp_timer, jiffies + secs_to_jiffies(14400)); } else { /* The day the leap second is scheduled for hasn't been reached. Retry * in one hour. */ - mod_timer(&stp_timer, jiffies + msecs_to_jiffies(3600 * MSEC_PER_SEC)); + mod_timer(&stp_timer, jiffies + secs_to_jiffies(3600)); } } diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 813e5da9a9737e05ec3ef85a495fe38cbb40c49b..99095ff3897c1b5337f7e2abcf10f3fe8219ad7c 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c @@ -370,7 +370,7 @@ static void set_topology_timer(void) if (atomic_add_unless(&topology_poll, -1, 0)) mod_timer(&topology_timer, jiffies + msecs_to_jiffies(100)); else - mod_timer(&topology_timer, jiffies + msecs_to_jiffies(60 * MSEC_PER_SEC)); + mod_timer(&topology_timer, jiffies + secs_to_jiffies(60)); } void topology_expect_change(void) From patchwork Fri Nov 15 21:22:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876905 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 8114CD68BD7 for ; Fri, 15 Nov 2024 21:22:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 222526B0095; Fri, 15 Nov 2024 16:22:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1AA416B0098; Fri, 15 Nov 2024 16:22:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F40EC6B0096; Fri, 15 Nov 2024 16:22:48 -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 D63B86B0093 for ; Fri, 15 Nov 2024 16:22:48 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 5A9AC1C616C for ; Fri, 15 Nov 2024 21:22:48 +0000 (UTC) X-FDA: 82789602252.06.092974F Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf29.hostedemail.com (Postfix) with ESMTP id 96E45120025 for ; Fri, 15 Nov 2024 21:21:44 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=RVx2emb3; dmarc=pass (policy=none) header.from=linux.microsoft.com; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731705677; 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=uwqJCSe3GXdPjGHghPvDBfnEwZdT0uYA3z4HTDFu1hA=; b=1akkDW1y1TKWSlGuHVK7xGmE2HvY1kY15CB/Tc+iiDycOJzISAXUVdYNXts8TNebCOjUK/ qqzK075lz85tQwBXtp7+KixzweTJuGoqPY2dB+NE6PJ4LMUIhKf9jFmUZjmpPqKELWvuVW 2xQD9TMyh5Vdu/D1aqxekYGLcmZtwbs= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=RVx2emb3; dmarc=pass (policy=none) header.from=linux.microsoft.com; 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705677; a=rsa-sha256; cv=none; b=KgB1Y+dPG2sxoFHIQ/uKP2eCLGsdZ6bp3hL2CM+HuDkZwOFEHcAuB9xCB+Q5oWJ7rcnR3b 4M5zzsxiORR5TzltWMcPYBoAj6q1tffkw1rUaw5IAByXfS1iWV8WuuDAVZOvYO2thJs9gT fFypweZS+Ux+wxxzgD81wHKOyTUQSt0= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id E451D206BCE8; Fri, 15 Nov 2024 13:22:42 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E451D206BCE8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705763; bh=uwqJCSe3GXdPjGHghPvDBfnEwZdT0uYA3z4HTDFu1hA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=RVx2emb342NEz2mst6RfMUiki8VYrjbKedjHqPNNNkb4BXhLdZgldqHGBRr6S5V4l ot1jj3ag+tv5arCezMBNlcZVolqJ/kVXCKfLQi6UufSSi9gPBN5Z2YR5EAMTqKRljK uRWcAwELTERtWaAvz5gx5fAH4KPOOU/VcBtZ4kx8= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:35 +0000 Subject: [PATCH 05/22] powerpc/papr_scm: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-5-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 96E45120025 X-Stat-Signature: 8e6dhcwkm1x4qa4j8arsdejb5x71o8nz X-HE-Tag: 1731705704-259421 X-HE-Meta: U2FsdGVkX18q0egCPqBYvZJQLxcvUfZQetOc7tTz+OEFx+7qAOGw6rdNJhq8bq1A5/Q58l2Ld00o7vypW8yHiBaZazwfwr3RPmeprLGIc3O9ln5yW3/rcZn6TrB6eihnRFisz8A8IuS97XM1C0uyglo7XZtoCoXEXFXHsfGJLlcgNG/8Bd0HLAOX+iFfyo9qBSdEJU2KutWGyrKSUQF/q5/8ZZYweOvzMGxFWZZFhfTqlfBXxM+d1AGeosngEoDmVxP9aJZYRdJmznw3qyaEvvsVeKHryrew9PTvei+MhFwNbfEMnrU9EhUeHZHZo7n1j1yKA0+ePmiqgozRQLHpKro66rLQ24md3fJqzKiXynBbwf/+3b5LdLr2RLurkMQgtE457JRdhErlcZVsT7HvosJR3PWxtjev/zX3fdGlddBPjHLvpyvn6UON3fJD4UffLBBvfUVbVPgR4qRPdGwLDOwixhaVaWB9TOOk8HOx8g5j30d+6TZNGFRdSEcOqzrnkZhY1/jWqyYskYVT3l2Oj53mogxXnJPbTn6LO4hhz3vqEdv9vqMSJ2e9VhwfXonK7jXPEpuRfT6pOd9Wp46PB3/1HhjY043sIrgp4U5UlG5vniGOosgCu7mteRMPkVs0uI70Mqn3H++7copDvFf5X1WIg5ntx8myi3784rQdD/C8Bn0WqXBRuYdpDloD8cuSyjXrH/4rLtxF7n+6zprV/1HLeaFsj0tIF/XzKUa6oLHPNmiEECh7nzLBiyR4Ie0hgx/DjLdnMK32pO4GtLw8eiz5Jgwu9sP9gXmNRM5jc2HNLh1BmVC2Gg3J+AkAIF5jk/EjHw9VKc+oIahKHaBe93mzEPjtdHxCqWSe0tirSz59pq4sJNrB/xqFqEzQJPnYNjt+m2BZenbQp1l/eax1D3WfAtHNSkGFNvg8PB+xVxkFVfE1w2zCVRXKxdBAtt/Pd/2OCK2KXrvne/hx/P+ 7iy/5vHw J4ZyME7vVQH6uFFfV5JWOyl/cP06kRTlQTZu2jW5P1ZnRbh77hYQ8p+8k/w8PpHDSLlCmjyLLpQQsx+xfy/x9MMIljdggV8f/LaOEoMb7SyMTn2UbOjbU2d7X47fDOND7Jk8n3s4DSOTFdawQrUt9xVw3USxEhC5exrqAcgpbaeeywfoO/zldeUwy2NKCB4yEfWThDd4UuuSSGZZOXdJ685X0zA/Z6CBaw0wne9CJIWehApeV9qkjHXqHCPW6jNz/cJ1Yww36gQr4KEJ6F8OPx9DhHFYYpNDCMUCkL7TnCDKm7saKY5sMCfibuInwOsrnlS2tjRuTytwXIXOzDoJJlXpwM5fTAd72hSOSGjf19Lr/wFkZj8OrtLMKCrOHcj4gmSKjgl5zMjgHBNvoIBec0RcCZjLY6ajTxHguooL1F5v3b30qtU8slF6/+kaJGPmOHCP+ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- arch/powerpc/platforms/pseries/papr_scm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c index 9e297f88adc5d97d4dc7b267b0bfebd58e5cf193..9e8086ec66e0f0e555ac27933854c06cfcf91a04 100644 --- a/arch/powerpc/platforms/pseries/papr_scm.c +++ b/arch/powerpc/platforms/pseries/papr_scm.c @@ -543,7 +543,7 @@ static int drc_pmem_query_health(struct papr_scm_priv *p) /* Jiffies offset for which the health data is assumed to be same */ cache_timeout = p->lasthealth_jiffies + - msecs_to_jiffies(MIN_HEALTH_QUERY_INTERVAL * 1000); + secs_to_jiffies(MIN_HEALTH_QUERY_INTERVAL); /* Fetch new health info is its older than MIN_HEALTH_QUERY_INTERVAL */ if (time_after(jiffies, cache_timeout)) From patchwork Fri Nov 15 21:22:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876906 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 F33B8D68BE3 for ; Fri, 15 Nov 2024 21:22:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 950A06B0096; Fri, 15 Nov 2024 16:22:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D79B6B0098; Fri, 15 Nov 2024 16:22:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57D0B6B0099; Fri, 15 Nov 2024 16:22:49 -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 21C206B0096 for ; Fri, 15 Nov 2024 16:22:49 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id D13684037B for ; Fri, 15 Nov 2024 21:22:48 +0000 (UTC) X-FDA: 82789602924.15.D02561E Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf20.hostedemail.com (Postfix) with ESMTP id E38881C0004 for ; Fri, 15 Nov 2024 21:21:49 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b="imd3kVk/"; spf=pass (imf20.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=1731705710; 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=cDb5q9ey4rgvzuTMFsMkjW3R4ZHiX3a+lRd3JDjV6+Q=; b=xLLMmnjauQQd0DUGviMvtRgN1fyV88G3fuFSy7fVBGGtPLer/iBJFEtRIkqZegD1c6+T9N 2ErLY3NxdgKcm6svSaZhC1nf9egKfcNaozIfQTB+LEmba0j0TUjd9hHYgV8vwV2f28ONNK cnbl0/9dXYw08t2H6qTAqZHu3vp7K7g= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705710; a=rsa-sha256; cv=none; b=0+nX1EFlk9l5FjGXWY/V3WUP4WJ44sUwFW3D4xtjjtjCaSEYZKBV3xyFo9dTdHvtzEBNSK 4blM4n1Yu5sTXzzgXMJbqjiKM/Ikf2b6oqJu3xGyvHyECXdF7HIBSJeids5Xxzokj91nTQ pkdLl5fyZUhA+3OM3TCN073/UaLifwE= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b="imd3kVk/"; spf=pass (imf20.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 256D9206BCE9; Fri, 15 Nov 2024 13:22:43 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 256D9206BCE9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705763; bh=cDb5q9ey4rgvzuTMFsMkjW3R4ZHiX3a+lRd3JDjV6+Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=imd3kVk/tJhJYNa/xeixDhpAwYPvx4IlSinPbk/21FlgSBXFMaFV4APntdnbxA1fq WRyS0aWoUlD4yY9/jG3e/ehoXMMrIljBVBgBQNEO519W/APj0YYahRFp6DV4wrhONm 8XT+qK7qOCSuyxWBlS/5K7TjbCkS44CjtifGQlCE= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:36 +0000 Subject: [PATCH 06/22] mm: kmemleak: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-6-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Stat-Signature: 13y1uwoa4tmnn1dh778dahy6yjp54qpy X-Rspam-User: X-Rspamd-Queue-Id: E38881C0004 X-Rspamd-Server: rspam02 X-HE-Tag: 1731705709-416518 X-HE-Meta: U2FsdGVkX19VkDap37JDTH07p5SiuDMdMb1b9yTLTsg8qyHFn25I2f9KeviLidUPvHtXggX5FGsq/6FlzEyLuiV0bcn63bWBaNKGAexo3Hu9UTzR7CBeoaHenI2vaAiPFjMlWtaCfv1deKSWNf4vIj7+EixCsEgm5m9uBwtJtufyFS6Otgz1k2DJjNz2NX0eJaUwd3KO5IgtGiBi94nc/bCCwJdWI9NbYvz6m5HOIMUXucoRJ3OdyuxXpjqxVprH5PibTp2FxrKuOLQ69+T6PSz+pSUyvH9HMOzBVmUjdVD/jmYJ0zOHULaKBv830OMiSCDquedQQUMJWHG7qhVfG/cEmR9o45PfgD0BCwL1ym92gfzsWUBy4Zk5nWzCOSwdpaTJIZ/m8qw27cn9fIGb3rt4oes2coL4LBBNozRosOMJX+dckgEachdgnQVxq7EEVTkyG2CC1TCmwHym9mBgmRf8jtmDGRYjL1ZFSVwp1uYeaXXBvU1JdujtJ0QRdUTcnQnV4+hUCLTeYvZULcB1xYgOirQBhEgdcvWhCxRyg8ixkkrNwkR9cIakHPZFeCY+HmEBedrolXo9Iz5lDt/l/ZyAqxtPAuR+uAM5BEj/wK9xNBbHoLRaVD0IzgCAiUvPmFqr4VZUETLomtkOozEe08tigMnAwm6/o/g9u8LsYfk6BvoXMT6+uv+PmaV3n3lHJU7bFvH76lODB0Q4/UZ1QCVtb/9rzPZMdUz3baz3xZ5mSZD3BZ8by38dTXYsErEnmGeDFXMV02J5OaBnwFJQlqMToyRuLgmbYvbjZhsOjlyrlG7mHq3Wddhvb5+eip3sNmoDS5SxHCrgBD9UrVH3K4LR1xf/nCPkyb00RKW66Icp/xeEjOclXlxuyHJAYNWEUQuixCGjy2vh02yMx6RUxTxnjgwdEAjObhK9FX0QhTDBlNRoXDFQbrh6FflyIOnjVMio+dFmxDI4g6cQnbX g5MRPPQ7 GNtuIVH+gXS44rogH+WCLOswH5Q4prC+Dnxmz7diNz7Tqbos9LgXXrjIXDagRdm13SkTVMoZ0VG0dHPIFXKUBwBUD86MCVBmPjLjU4IXtKIXYhMb/i8z3Y7AX8zSlFjAGEWBqWYgiEFaeKzhAmGtJXvXUl2kGUqM07tePJQYzIZSlrG5kqIalSinacx3sp70+l2MlFaq0g8k4raEQaWngYJe91nQi9S5bOSNvIFJUeRG4tuYdvf2KHK42lCs1Ay4kLrYZSb4j1p6iFHKl+jcBozJgeKdNnTtLFb3P4w/6bqQ93XlkzOAoEdKc8A/5uKaezEXpAQBw9S0P6Ko1bcJp13ALgnGU1N/hF/2SFac1em53qbNxuPbBbajcn0U6q0iz7euyGNdsVHVAgw/+Q48DCKNq2GAEjRpPyPJQbTmLAK0x5TZLZ2JZio4eDwDVemrXhmkP X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- mm/kmemleak.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/kmemleak.c b/mm/kmemleak.c index 0400f5e8ac60de555f43d85f1d36f67e48b4ebed..2c099d0819b1896390b842af76069a46bffabc23 100644 --- a/mm/kmemleak.c +++ b/mm/kmemleak.c @@ -1816,7 +1816,7 @@ static int kmemleak_scan_thread(void *arg) * Wait before the first scan to allow the system to fully initialize. */ if (first_run) { - signed long timeout = msecs_to_jiffies(SECS_FIRST_SCAN * 1000); + signed long timeout = secs_to_jiffies(SECS_FIRST_SCAN); first_run = 0; while (timeout && !kthread_should_stop()) timeout = schedule_timeout_interruptible(timeout); @@ -2202,7 +2202,7 @@ void __init kmemleak_init(void) return; jiffies_min_age = msecs_to_jiffies(MSECS_MIN_AGE); - jiffies_scan_wait = msecs_to_jiffies(SECS_SCAN_WAIT * 1000); + jiffies_scan_wait = secs_to_jiffies(SECS_SCAN_WAIT); object_cache = KMEM_CACHE(kmemleak_object, SLAB_NOLEAKTRACE); scan_area_cache = KMEM_CACHE(kmemleak_scan_area, SLAB_NOLEAKTRACE); From patchwork Fri Nov 15 21:22:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876909 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 EA8F8D68BDC for ; Fri, 15 Nov 2024 21:23:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ECC386B009B; Fri, 15 Nov 2024 16:22:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E79FE6B009D; Fri, 15 Nov 2024 16:22:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C34C06B009C; Fri, 15 Nov 2024 16:22:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 890566B009A for ; Fri, 15 Nov 2024 16:22:50 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 274731A0437 for ; Fri, 15 Nov 2024 21:22:49 +0000 (UTC) X-FDA: 82789602588.10.F6336BB Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf05.hostedemail.com (Postfix) with ESMTP id DACC7100011 for ; Fri, 15 Nov 2024 21:21:20 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=I95I66Jg; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf05.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=1731705636; a=rsa-sha256; cv=none; b=nIq9aCsTXWQLRydlS8Yb/cXUE6TOuiv0c3+lqayOcQ7AjP1QsMShapqqiRI2AKwdjepj8g IaIIddH2gKzE60bHtgpcUXvFfCwmdhZJy8NyHP5r4wc7rms4PT2gOUXAmDDM14DyVOYzHb WuO0doRs/aJgllzKoLMSB4ax1i8tPZ0= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=I95I66Jg; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf05.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=1731705636; 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=QYs6jKNkSqRMwxas8zTGS0f9EDen03tWxmE1GsbmPvQ=; b=USWVtoCFqIZ3kug3sG2YMuYU4jtCWeXZFq3abTXDvivy6y7M0LCAZPZrGRZH5NhaZ5/EbP 6yoXyrgziaR6OjyzmBL3b0Lwn0q8hrKH0GMq/6A7ZbxUBRr/yZYmr4qEksF7dCaJZfLymt 0HuuYMmt4W4HR5s4r5i8CA9U+GZDf8I= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 5C04E206BCEA; Fri, 15 Nov 2024 13:22:43 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5C04E206BCEA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705763; bh=QYs6jKNkSqRMwxas8zTGS0f9EDen03tWxmE1GsbmPvQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=I95I66JgO1E7XQYaEm7ineOx+2MkduTJSN9e4D1cu0/NE7dcCwPndmzh7i/cNGesc 2yzIBCvlbGPZzvMpNA+k96a1ZOGXJ+A0bPOMF6Lmuw/xKRtew/BB44Qgm554Xu3M7K XgYk3aN7aTdB7omQICy4E1708sGRqDk4h4Xf8u4c= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:37 +0000 Subject: [PATCH 07/22] accel/habanalabs: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-7-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Queue-Id: DACC7100011 X-Stat-Signature: co7f4eiiqoecwewojyqqmxxa5eed1obn X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1731705680-343278 X-HE-Meta: U2FsdGVkX191VLb5YVGhwFNJg3Y18F+MgFD3OcVNc2Pi1xrJXJbXIjSo5asYDLapYRVOxcuN85kQikq+Z/jQveFAVWBbEkUB0LFk+L0qg0rPyBtLHGa3KynQrk7ksd8E4BUImrkTueWWTOW6mBItzPPseajxYxoH7XXFYyODsgAkIg4wzfJMh6HNn23lYUPzl0vkSpS+iYdBNWc5tgWaSQ6vc6tj9urlThGM0uJSSE3FSidJ+rnIRkC8zcqJNYhuwkwiaXzUerBYbdHBVH5QZzoFB9J9aUEigEJ2hVAx1OpHKuMqJ8QMONzCHtZR6Z9hkQ1uraQCd1aXWE5oRwSMcINy5d3oSSjhHDCMq7SsNQygsrgMFYu//+VpnKhJibtV4qbsDelPzlGhaZAuPPx7nDlxVgHe9C/zyGMPlmqnmsomFmlRL3q4YBym0dZwOPzhvLPHAWo3Bb7z1F6Uj8No1XkosJ3b2Dl+hG6aGzlka6JlzJmc1OLmElANcXP7G4ZT+6vWFBlpSjbtBZu58Xeup/p7FSdIHTtfxBIAk1+KOTZ2mHEJezaCrvZHDgI8rzR+YxussFX5rKTd2DNbvAlK7d5PI4DlnKojHDUmlpMIu0C2vsyuE93p/dwYR6wMhfGdM2M9tvHrJTQ45EbO9I5syUpUP1O1rRJfg+xwtPXvtsRm1+YND9QkFamSjC0sr9/gJVTM/1Vm9p4vBifslhAJKjpUXChK8VSDqUB68mGe6RICXIVR9cVzgF2tuS4CSddMJUCZKQaLVcrXdAUIzdeEfTAmeADlDszcRM3hShbiG9S/exhRDYIx+0Y33VS89RMkbsEVjY/J8WnGr/WgXWCG/JcJRbRvDaXZvG1Pjt9Dmc0xMhU9mNNSNktibFKBovlHgz9SN33Zrvc92/iKUjgDTjmZHX1gqoZHFPPWL3tbbA51O9O5OfEIDkx4WU4g/0cwTVWPOG3wKw1CVpTpVqG vQbT1C5u 5gnBz3m/N57Z6hNYrh6woTuklK0RjP1XzRxp8m+D5EVv6rwl/z3hlOUjmbBpgqIGNZ0WiZETquiVW6PQTG/5mU/UbHPUupReWZsFy+MeEAYXKc0OTdB42N0uM+Flh0q0M8GXtZgCJZj/VFJiMd+py00xjJyPcleFcgBNP62a+rtSlHZTHuooi5R/X6WnJWFcgoTDFCZ+bqD++MWzTdNHTnhh8jyicu/bC84jjTPf+JCCDK2PJSEXWb45ZZsWV+0N5ifWD1z4ffYTFcl2LRB0CyCyZB6fOhPb7a5gQEpBWGSPjZPYpFiSE+XrXNzZxR3Sxbqn7GUID6jGQlsR89sJPusuAERMkEhDheQQaiWwlALO41wzwfGNDLrTYtBYwmzOeFbD2Me/g0R/cVoOdgjXkH4bJAqWoMGWb3VPjp1jKC4xTY048V+u2DtmdPw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- drivers/accel/habanalabs/common/device.c | 2 +- drivers/accel/habanalabs/common/habanalabs_drv.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/accel/habanalabs/common/device.c b/drivers/accel/habanalabs/common/device.c index e0cf3b4343bb081638430f2552ed27431b488ff9..30277ae410d4b742ffb7bddc35498564ff96fe62 100644 --- a/drivers/accel/habanalabs/common/device.c +++ b/drivers/accel/habanalabs/common/device.c @@ -817,7 +817,7 @@ static void device_hard_reset_pending(struct work_struct *work) } queue_delayed_work(hdev->reset_wq, &device_reset_work->reset_work, - msecs_to_jiffies(HL_PENDING_RESET_PER_SEC * 1000)); + secs_to_jiffies(HL_PENDING_RESET_PER_SEC)); } } diff --git a/drivers/accel/habanalabs/common/habanalabs_drv.c b/drivers/accel/habanalabs/common/habanalabs_drv.c index 708dfd10f39c584a6221c29015f4b0323574145a..5ec13f3a46f915e75b04582b28d51ba8bb50be78 100644 --- a/drivers/accel/habanalabs/common/habanalabs_drv.c +++ b/drivers/accel/habanalabs/common/habanalabs_drv.c @@ -362,8 +362,7 @@ static void fixup_device_params_per_asic(struct hl_device *hdev, int timeout) * a different default timeout for Gaudi */ if (timeout == HL_DEFAULT_TIMEOUT_LOCKED) - hdev->timeout_jiffies = msecs_to_jiffies(GAUDI_DEFAULT_TIMEOUT_LOCKED * - MSEC_PER_SEC); + hdev->timeout_jiffies = secs_to_jiffies(GAUDI_DEFAULT_TIMEOUT_LOCKED); hdev->reset_upon_device_release = 0; break; From patchwork Fri Nov 15 21:22:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876907 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 60E2AD68BD8 for ; Fri, 15 Nov 2024 21:23:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9016D6B0098; Fri, 15 Nov 2024 16:22:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8117F6B0099; Fri, 15 Nov 2024 16:22:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6652B6B009A; Fri, 15 Nov 2024 16:22:50 -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 389E66B0098 for ; Fri, 15 Nov 2024 16:22:50 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id DBE63AC5F8 for ; Fri, 15 Nov 2024 21:22:49 +0000 (UTC) X-FDA: 82789603638.28.95EA41D Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf11.hostedemail.com (Postfix) with ESMTP id 4FF534000F for ; Fri, 15 Nov 2024 21:21:51 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=AQnLLRjE; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf11.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=1731705588; a=rsa-sha256; cv=none; b=6+3d2MLowZGM+iGN6swTI7AuviRGbjB8MHU8aZMEIcfgF2LT6TcYEa3bcrup4GVS93nXyx EuMaCck72AxIKRMxJg3f2Waf3PDcLOgYwBKMNOEwsER9OyaLPBe9qsKPj7ZeEplC1OXsWw DBJS0IKZklG9ONhRs3Wn7rG5WFgkOI4= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=AQnLLRjE; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf11.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=1731705588; 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=GmA2v8FrQkDc3PawrRu1NLBJUu3qRf/naCkvRhlPz0Q=; b=GsHAd31irEI5o6zuE9VLOvVi8+k2YYrQbEozxOJCx529IvRH7qaKFiF8xS2WdZdCrrCkJJ NkJ72Pkv2pOwdnxD3gOuFqj5edwLyYmnz2v7B+mT0JJJH30VjcyZOgMBOpLpa3LerSW2+T W6dDtnJkqhQg1b74CklPAOQNSv6nHP4= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 8FF32206BCEB; Fri, 15 Nov 2024 13:22:43 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8FF32206BCEB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705763; bh=GmA2v8FrQkDc3PawrRu1NLBJUu3qRf/naCkvRhlPz0Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=AQnLLRjERYrPiRXzVPhEVdOI2zLkiaTTtu0h8ex88Rh4yJJCvweeNDaisxPAM4okm aUzZzyLz5s6fIGp2xPOyrtkNts2+H40xXXXdKkNXjhayIPxOfHe+ruxbTRrUqhXle2 46t8LcG0ioPljSxshglWdZxLMsfg/70LBRvzOJRk= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:38 +0000 Subject: [PATCH 08/22] drm/xe: Convert timeout to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-8-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Stat-Signature: 9asukoj8bzmjpscorr8zc1g4g6a1zgbk X-Rspamd-Queue-Id: 4FF534000F X-Rspamd-Server: rspam08 X-Rspam-User: X-HE-Tag: 1731705711-699278 X-HE-Meta: U2FsdGVkX1+/AJWVrY7ry8tKA4+QHfC2aWKIU90Z6N7nxvWlRwAcSmiY5hcA6bQokGwXlvj4Z3oruQbn+8/YkCq/ItrLECW8OYQueWP7Wn2PjuPxIygUbKIoB5Vk96Rw2J8ggcOdMA+rpOoZY907US/BbfrnIJ4VLM/QiFO+LbFnt/NikK6VZRBXgMRItMcGuicS1cI7fr8VNuE6WEv3A4WuKE5Rg5kP/pDfY4S51G4k3crxSAEaFc1N9/6Zd25Lqd0gEmfCXAbQ2m13rV5/hO+kkQKn8Afy4IOT45OMMsbRYKPGwVgeVSjj0O3sP0lqHbbcmTVxqRhaAvP+E07IkQjFM4cp4KBQy9bIaOm8RukJQ1Lynwjd1Z4k3Tt5WxjhCAU1Kz8a3+TkU2vjLR7EwMzZJkYpHkxLatfWYyS6HmU8cEZu9Zs7JnG3yuZ49lBaVjjej0aRP02clCB2bMR3yGGk4m13fE2bL569QZ4HlJRbEK7gysdbBfeK+0DRiOrfRgwYpqT6BzU5mQXSEC6lx7A0Iz8IYrbs4xc9v3XaAlFTDEZrnEShWx07nYWFfd+MhGat0YeGudAmWYFdyXJNzLJTvt3rfYc66cuxR/OnoiP8zYq/BMUFotHo2LIsJwtAJPp72cBJ4JWMMAHnmN3S6kqVXkMrQ+m/2uI8VU1roWOqO37aVo69H+urJA/LZfUZQEbAdXH0vFNXuraUOaE6w7hW9bldm4rFzYrOnKgQ6dqKEFxWokGejis5NKmssqXTh5oDh8/PqfEe+shZYrggwDDR6jI/fnJXAc5V280lQCJS/WgUb3DmDq3RdPi2QrEKx4Xr9zEaKPVqSKi9jWwUaEKQ6xiv9+2f7qcybupAziB9XlJfWyFzmd43Z2llWwVKZzjzwKLz0l6GUD+jXOZnOpJ7A5e/gpDbPabrDYWbAcBmcsBQIN2jsJPrbjzTzpMrATeBjBjnDjrwiWWXIUN DbtsMpW5 mDFkEIeD4FKHEZI9LcCMOhsASXLSGPwLBrDG8w2tR1gKwPgt4oyqIv+2FcO7Py8PtECfeiL9q6IyIZG2LLP/D7Gf7yMJd1Z4Z4yfDS+L60fjRFkEc3D8AWpYBum9ijjrj65NBXHAmhbO+rK1HiPQ+m70LuMSYaCvYDNuUJ8z/pQJY57ThDWcPW3jX/6m86j4+uAMeIwpyLH/XSbau6AC/65jSbjb6sKXokq7FPmxCI1LW/X2DYRdk1zn8g00UBeCfcFR8RJbmUPx8/vUc5XbLCUO3dSSOTe+b+h05hiiXKBEW3QBjl15jChgSdC5g+HoYVa+pyVUSeLMLATFGTcP+Fmkjl25byI8Bz7MpPyFYUY8nkizkrQWr4076OiazriNnNRPTTbR14hx0ano19z8c1Zh6yWwxO3DVKEgqHwapYcKMc7GV4vsn2Azw6w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan Reviewed-by: Thomas Hellström --- drivers/gpu/drm/xe/xe_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index a1987b554a8d2aa42b29301f2853edddfda7fda5..bb3338ef4191e76128611eeb9531c9d2089db85a 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -502,7 +502,7 @@ static int wait_for_lmem_ready(struct xe_device *xe) drm_dbg(&xe->drm, "Waiting for lmem initialization\n"); start = jiffies; - timeout = start + msecs_to_jiffies(60 * 1000); /* 60 sec! */ + timeout = start + secs_to_jiffies(60); /* 60 sec! */ do { if (signal_pending(current)) From patchwork Fri Nov 15 21:22:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876908 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 7A488D68BEC for ; Fri, 15 Nov 2024 21:23:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2C4626B0099; Fri, 15 Nov 2024 16:22:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B2A56B009E; Fri, 15 Nov 2024 16:22:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D3FCF6B0099; Fri, 15 Nov 2024 16:22: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 8AC876B009B for ; Fri, 15 Nov 2024 16:22:50 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 4052AAC5FD for ; Fri, 15 Nov 2024 21:22:50 +0000 (UTC) X-FDA: 82789602714.26.543596E Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf30.hostedemail.com (Postfix) with ESMTP id 1A1F580010 for ; Fri, 15 Nov 2024 21:21:21 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=VBP5tE+9; spf=pass (imf30.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=1731705530; 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=z5d0KiQ+mxHfS/dtMsbc4ttBd/lyUqPHYPOKqCM1B/M=; b=umB6lyeZMtf92+c8fcZxv1w7p9jxwsQ9HQC+5QBTn09kMCW3DHlRgQ/nnPSAC7opIy4eio KJ5B1wJx4twklUBM+n8/Hhx51MczBwQomjVA3o4Xam/hU6fblU9eX3OlQZusR/92bvq8j0 SB5LRYzgUxDSnJZVO3wsZQlx9W2TfIk= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=VBP5tE+9; spf=pass (imf30.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=1731705530; a=rsa-sha256; cv=none; b=I4CQorVPAW4KR0ZMzllTBDERe43BDx1/RUgHH2auEqU/PgUKMr8vvHjWM2pkuUgc/zjaeW aD4C6DFB7C/AE79T5ovwfmHnUGH7hoQ3mUeJqM9J4YpW2BUoYdNr02qBKdWH6MT1Lf2IG5 NgCZ+tAb8zQCs7vIMz+4crisQELu5tw= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id C16E420BEBD0; Fri, 15 Nov 2024 13:22:43 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C16E420BEBD0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705763; bh=z5d0KiQ+mxHfS/dtMsbc4ttBd/lyUqPHYPOKqCM1B/M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VBP5tE+91MUeXr01PKBwol/kwfSOvrGFcon5R6GLvth1r2SEL/vDLGmoM3VztkA/D HDCC8H4UjO/VDL4my3JCQHRpPk1aNqcxHWoN43qx7hLXlHFWnlfQU1gMcNN2K2LO5S 3qBHgiY0qCMM5wc+rwKNzT/8mVMznrFpdjl06mtQ= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:39 +0000 Subject: [PATCH 09/22] drm/etnaviv: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-9-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 1A1F580010 X-Stat-Signature: r9w53zoiike4ybdb1hsjf5sd7mszk1is X-Rspam-User: X-HE-Tag: 1731705681-682470 X-HE-Meta: U2FsdGVkX1+Vfc3S2MpLmSjZoz4+UlRcqErcYH2yKpQnItb08m+1bpx+LavKWUd5FOc29zpinF6dYlKBrlnkRpoCvCIwk5zKV+jHG2ZDKBk5ZimDPsn5df4WTCFgRXrVDSWCw/pi07pSV4mVbmWJIErbb+2r67fjjCXiXNP2Va2aUXWvzvH1ReucZ09KeieGg+19KMaPDvnpVH3lGj/z7zP6ASapBRUWs3YX1QhcuWAPMjIAA9AV/AFfyqtwr+2MRzbofb2QES0DgVjmwGw26WQ2dFHaYYjxccJy4rITW/ZslV+GycYB0OC0X4l7cMFum4odagGpd8PnSiaTpFjgywNBXxYpOchBzsnRG0ZmuFLeFKm04Ggn9paXGTQ2DL+GVYXWoGW7gUDuQxPfg33L/bV2jtFO6s8clFmo7ZbZN/NM230saSuWCtQUB+AXplgGkxbnGUcpqyj9SRCqqehKE6nkNcqx3J6eifPi5vMzHtCrcsCo6MyWng3I8zn/z5h0ZwsC4qOyIlD7CIkk+cvPV9BJxrDr+NMR75O/onfhTOk6JWSdcyXAtK7XY/oSHKVlErSc+u0W1zJAUr+5r+1SqkAheqsryFcY+X+xU54TqS03gASc2RXjj4QuFGT9hsjZtQ8aO5Mz/M/8ARsMo6Rwp41CgNVKhc/uQV6n+oPNvLnk9TUnYgq6wdgg1L2ADb9HEJYyT7mkcfXdSmv0WL4Xggy2sNZLiar6on/5X2Wwj8DGXsPmqaY9g9D9eYF6AbXHLVsXQPqh2QkcdRuNRlGLRi0VFR4Y6uhmYI+uQPUPc31vB6zl0Hf70wJThvaAIB+M9+NlJrmfoKSEcpN8FNKpe93Qw+Fa9MYPNK/TgonBWsRWYTNCqplJGJpTtIoQU+N4apcekIowBCnLHpv1ljCZoMNoY80BbBsz0f/Y2EP9jPOBV2NwWoHMAkfu1N7dmVUT+3VACfjSi42TdllP7+N G/M2sDOA oJ6Te4QK4rdiOPmg+dNYXRJhUZH72GESd+/dCybkE1GwXVr8LhcV+Dvcxa9NFlwkMwEGsF+TdjpQI3UzFba9NJNt3SIsnETpU5DmMiKBYpM7iMVu/xQu+o6TFjv3a+JA/lnSO64ij9dqxUVvoWkPy79TI1l+3nlJSXfIk0JjrdXBEFLuFyyBGsUnKEF+7/v7WGvnVNKYAjeJuZEFplcLIbC2OSp0G0JN4mSXhPZgtmWrOw433szED68vScrAbgfxyyRYzDB5dnYYEOMSnC41JnwPtoe66OeTXWwmvt/wBrddhgOVStSLEby5g4QSAy3P0VaE9DXV3eBDwdPYVtI/8XAahIKprzNVR4p+4xHM+GQeKGOmSP25OFikuoSPdvIQubKg/S612XnkaXBGPxxtA/qcV8ClK71ZJZwWlk/TnoCovdpcEIML24djt7g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c b/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c index 721d633aece9d4c81f0019e4c55884f26ee61c60..0f5a2c885d0ab7029c7248e15d6ea3c31823b782 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c @@ -100,7 +100,7 @@ int etnaviv_cmdbuf_init(struct etnaviv_cmdbuf_suballoc *suballoc, mutex_unlock(&suballoc->lock); ret = wait_event_interruptible_timeout(suballoc->free_event, suballoc->free_space, - msecs_to_jiffies(10 * 1000)); + secs_to_jiffies(10)); if (!ret) { dev_err(suballoc->dev, "Timeout waiting for cmdbuf space\n"); From patchwork Fri Nov 15 21:22:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876910 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 359B8D68BE6 for ; Fri, 15 Nov 2024 21:23:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 779B46B009A; Fri, 15 Nov 2024 16:22:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7024A6B009C; Fri, 15 Nov 2024 16:22:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5034F6B009D; Fri, 15 Nov 2024 16:22:51 -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 E525C6B009A for ; Fri, 15 Nov 2024 16:22:50 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 9EB781A044E for ; Fri, 15 Nov 2024 21:22:50 +0000 (UTC) X-FDA: 82789603176.16.6189DDB Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf29.hostedemail.com (Postfix) with ESMTP id E4EC2120025 for ; Fri, 15 Nov 2024 21:21:46 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=DOmpiPqE; dmarc=pass (policy=none) header.from=linux.microsoft.com; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731705680; 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=61FzWbZx8SVE6r33ggD3SgPEq3e2wgbU4/WDXmU67Oo=; b=yN9bQuYTSpUELLnRi7SvR5zAdP3TgHHe/ApAr4E/SzpBDQC4QqUGZmVymM/BAgV6aimM3V 5YfOXjUWHiDq4kHpUEl/tHcdbxVl48N4Ie872WkZFdeJarYhez+1etFwAT/k4Dv/JpPt0Y nWBDxgncmpNlBwOTjmDhsDtYjfj/UEg= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=DOmpiPqE; dmarc=pass (policy=none) header.from=linux.microsoft.com; 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705680; a=rsa-sha256; cv=none; b=MWmK1fwNKcF+xJXKOQRcsj7w5woYCMNPwcTzWEWAbVa+YZaXkJA59rAYn9WVa1E1iZNiGC ppu2etTYIJYyWQouO5cr4EL5WLyUgkogW0wdaRYQ5BbNDqOLdVMW86+OaeTNwFw7q5xPMj JimFnBcfrR64hOCdlW6L4rVY719/Jys= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 0429F20BEBD1; Fri, 15 Nov 2024 13:22:44 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0429F20BEBD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705764; bh=61FzWbZx8SVE6r33ggD3SgPEq3e2wgbU4/WDXmU67Oo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DOmpiPqEYKf9HYvH4vBNIcVvfzhSlsEJngIViJ/nyGqO2XrYUeSBMlaznaVp1W2cu ZUg4grO0SjULjCP+Mukp5XmgB/9DjGqaSbQQ7rTaKzOeVo8jg5BmmuuAlRim9GVths B2tZiF5YDxbFOhKnRrq5+IHUzQ7bgR5YW5x81bkg= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:40 +0000 Subject: [PATCH 10/22] scsi: lpfc: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-10-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: E4EC2120025 X-Stat-Signature: ob9k6ff9p81uhf1kqwm8c7wd51myx6dy X-HE-Tag: 1731705706-222129 X-HE-Meta: U2FsdGVkX18Cfo15OLY13387t9u49z5iKYKtSI7/Hoyb+kG9UbFvWGeRyymk436seLzlZZYZq7iygvh31W/iC1sBN1w3UHkj4ieskGFu+UycJFC6TsT5wC9YMIA5NF/MoaRCrZjI2udp2fvzp9OJbC78PKioWUe64Gc7LdfSfqfe2RoAzxmEfzo11rKP0sr3PeQ52e6Ca5i/Zi/IC7IHJTgH2IQo7xW85AABPl00hQcbURGKwpFzsi8Yq4p6KegwCkLZfYsmxMnLdDa4zsp+Q7Cpn9nVou3bhlnX2QWzbrG/cCEXOVoigeFEp7YRfAQWgPEOqlPtqiqzQBueaoyIRiVe0VL2vqvha0rMPCuMFGP+/2ODXDzdFDafgaTJIBIvxx2ybZMvGY8Xj9l1GonCqaMsqo9oVW4iK5mRZPUe+AgqcfCeCF8hoiYuYbtu/aaXbNaG37BLH1f94vcb37YpLtZWyMsIoxGW7kRfC124o5g/adB2cpo04hOWHjpfXLA6n2gs6rlBypWm/7p7DsQnCNyNgttSlDhohQEdI1U4kwFKTx905zl3cw2n6gurQicCodu3+E0S15Lj11Dq8+pWeYm3jLH18x6raCi+VEfcSO1VWMYXFE6NYQCw5XTAi+LsMeSya/GTgoirlqQq8xdYBzJE5iqICHqreFitNcCwtF7zcj+Jjf6U29BUL4qS0mNCwEbhiG8p6tdyOsuym5drgYag9ctwWebgXOwuMxTJAY4LVvzUEFujIhBbTLm+sh9jcW3fSrrlAWJdrTfVhiraRpZL3DcvHZWHmXYGNCbn4WGeCalVRe2rt9xs74Xu5AjHNVsZL2RPsBEo05Ku8uyjDFYLS1CxdcOBOBzY2ybsH1n2CHxOW9OsPO+iJkQxrW27X86uudzha+ECGlgwMZTwRCQpF7l1PuoY5NXJfFSgVQRAvRAUO7yZQEjPSOUROv0RUwGHZ69HGML+98BdVjN iMSXEvUi kYpzWCHtbn2eTBSik8UPJCpepiVHOX89yK1oyI//X9tQx2X+ETpegulfDzVLJMtW+2dE2rVS03MAXIXFnnJJHv+eEg3CY+e+aY9G1f8568QFzR+Gycex2QMbk12V9ajxkVwUrTa1Ap/SaR0/xvhWsBS1srlVR+8I2qUd+YHnTe1DnyLRi0k8U6VTQpJFYtU4CapxcJyxoPMo3rDyVQqWH07m7VrbpXN+8FeP9xhTMezpfpORzSY5Ko+G/SJj+7tZqry/ZLHpXgEhIBgVhexHgtw5Bim/M6vDNW1j1hBHUp3BoeV07A6rI7oZ56YY8vwmuvrq8B4r9QpjT33aEsIFHCMimGIZB6d9R3Uk8IIRf5mVCYohK86EC4+aQpcHK3je6esCIULueJKgW+QXu2FLOJI+XmGbX+vn4GSBtEwvreIqkLn2sFXQE/JgUnEIl6mrJy416 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- drivers/scsi/lpfc/lpfc_init.c | 18 +++++++++--------- drivers/scsi/lpfc/lpfc_nportdisc.c | 8 ++++---- drivers/scsi/lpfc/lpfc_nvme.c | 2 +- drivers/scsi/lpfc/lpfc_sli.c | 4 ++-- drivers/scsi/lpfc/lpfc_vmid.c | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 0dd451009b07914450dc70f2c981b690557c1d8c..12666c4c7986ae0bdfaa5c8f040b4ea0be64550d 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -598,7 +598,7 @@ lpfc_config_port_post(struct lpfc_hba *phba) jiffies + msecs_to_jiffies(1000 * timeout)); /* Set up heart beat (HB) timer */ mod_timer(&phba->hb_tmofunc, - jiffies + msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL)); + jiffies + secs_to_jiffies(LPFC_HB_MBOX_INTERVAL)); clear_bit(HBA_HBEAT_INP, &phba->hba_flag); clear_bit(HBA_HBEAT_TMO, &phba->hba_flag); phba->last_completion_time = jiffies; @@ -1267,7 +1267,7 @@ lpfc_hb_mbox_cmpl(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmboxq) !test_bit(FC_UNLOADING, &phba->pport->load_flag)) mod_timer(&phba->hb_tmofunc, jiffies + - msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL)); + secs_to_jiffies(LPFC_HB_MBOX_INTERVAL)); return; } @@ -1555,7 +1555,7 @@ lpfc_hb_timeout_handler(struct lpfc_hba *phba) /* If IOs are completing, no need to issue a MBX_HEARTBEAT */ spin_lock_irq(&phba->pport->work_port_lock); if (time_after(phba->last_completion_time + - msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL), + secs_to_jiffies(LPFC_HB_MBOX_INTERVAL), jiffies)) { spin_unlock_irq(&phba->pport->work_port_lock); if (test_bit(HBA_HBEAT_INP, &phba->hba_flag)) @@ -3352,7 +3352,7 @@ lpfc_block_mgmt_io(struct lpfc_hba *phba, int mbx_action) spin_unlock_irqrestore(&phba->hbalock, iflag); if (mbx_action == LPFC_MBX_NO_WAIT) return; - timeout = msecs_to_jiffies(LPFC_MBOX_TMO * 1000) + jiffies; + timeout = secs_to_jiffies(LPFC_MBOX_TMO) + jiffies; spin_lock_irqsave(&phba->hbalock, iflag); if (phba->sli.mbox_active) { actcmd = phba->sli.mbox_active->u.mb.mbxCommand; @@ -4939,14 +4939,14 @@ int lpfc_scan_finished(struct Scsi_Host *shost, unsigned long time) stat = 1; goto finished; } - if (time >= msecs_to_jiffies(30 * 1000)) { + if (time >= secs_to_jiffies(30)) { lpfc_printf_log(phba, KERN_INFO, LOG_INIT, "0461 Scanning longer than 30 " "seconds. Continuing initialization\n"); stat = 1; goto finished; } - if (time >= msecs_to_jiffies(15 * 1000) && + if (time >= secs_to_jiffies(15) && phba->link_state <= LPFC_LINK_DOWN) { lpfc_printf_log(phba, KERN_INFO, LOG_INIT, "0465 Link down longer than 15 " @@ -4960,7 +4960,7 @@ int lpfc_scan_finished(struct Scsi_Host *shost, unsigned long time) if (vport->num_disc_nodes || vport->fc_prli_sent) goto finished; if (!atomic_read(&vport->fc_map_cnt) && - time < msecs_to_jiffies(2 * 1000)) + time < secs_to_jiffies(2)) goto finished; if ((phba->sli.sli_flag & LPFC_SLI_MBOX_ACTIVE) != 0) goto finished; @@ -5194,8 +5194,8 @@ lpfc_vmid_poll(struct timer_list *t) lpfc_worker_wake_up(phba); /* restart the timer for the next iteration */ - mod_timer(&phba->inactive_vmid_poll, jiffies + msecs_to_jiffies(1000 * - LPFC_VMID_TIMER)); + mod_timer(&phba->inactive_vmid_poll, + jiffies + secs_to_jiffies(LPFC_VMID_TIMER)); } /** diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 4574716c8764fba6d6db103f1f287b7cdb87cebc..4185717f35defbde483b4ff9b1d71c9c3d86a07d 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -914,7 +914,7 @@ lpfc_rcv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, (ndlp->nlp_state >= NLP_STE_ADISC_ISSUE || ndlp->nlp_state <= NLP_STE_PRLI_ISSUE)) { mod_timer(&ndlp->nlp_delayfunc, - jiffies + msecs_to_jiffies(1000 * 1)); + jiffies + secs_to_jiffies(1)); spin_lock_irq(&ndlp->lock); ndlp->nlp_flag |= NLP_DELAY_TMO; spin_unlock_irq(&ndlp->lock); @@ -1355,7 +1355,7 @@ lpfc_rcv_els_plogi_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, } /* Put ndlp in npr state set plogi timer for 1 sec */ - mod_timer(&ndlp->nlp_delayfunc, jiffies + msecs_to_jiffies(1000 * 1)); + mod_timer(&ndlp->nlp_delayfunc, jiffies + secs_to_jiffies(1)); spin_lock_irq(&ndlp->lock); ndlp->nlp_flag |= NLP_DELAY_TMO; spin_unlock_irq(&ndlp->lock); @@ -1975,7 +1975,7 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport, /* Put ndlp in npr state set plogi timer for 1 sec */ mod_timer(&ndlp->nlp_delayfunc, - jiffies + msecs_to_jiffies(1000 * 1)); + jiffies + secs_to_jiffies(1)); spin_lock_irq(&ndlp->lock); ndlp->nlp_flag |= NLP_DELAY_TMO; spin_unlock_irq(&ndlp->lock); @@ -2798,7 +2798,7 @@ lpfc_rcv_prlo_npr_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, if ((ndlp->nlp_flag & NLP_DELAY_TMO) == 0) { mod_timer(&ndlp->nlp_delayfunc, - jiffies + msecs_to_jiffies(1000 * 1)); + jiffies + secs_to_jiffies(1)); spin_lock_irq(&ndlp->lock); ndlp->nlp_flag |= NLP_DELAY_TMO; ndlp->nlp_flag &= ~NLP_NPR_ADISC; diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index fec23c7237304b471e58194726ff7932b0010385..64d7060e0d4cb628c74c0fa22ece2b956155c1ba 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -2236,7 +2236,7 @@ lpfc_nvme_lport_unreg_wait(struct lpfc_vport *vport, * wait. Print a message if a 10 second wait expires and renew the * wait. This is unexpected. */ - wait_tmo = msecs_to_jiffies(LPFC_NVME_WAIT_TMO * 1000); + wait_tmo = secs_to_jiffies(LPFC_NVME_WAIT_TMO); while (true) { ret = wait_for_completion_timeout(lport_unreg_cmp, wait_tmo); if (unlikely(!ret)) { diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 2ec6e55771b45ab70320a9ad1934d5ead2371d4c..b6f19c123e25a00c0eb4444476a7194d6b045824 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -9024,7 +9024,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba) /* Start heart beat timer */ mod_timer(&phba->hb_tmofunc, - jiffies + msecs_to_jiffies(1000 * LPFC_HB_MBOX_INTERVAL)); + jiffies + secs_to_jiffies(LPFC_HB_MBOX_INTERVAL)); clear_bit(HBA_HBEAT_INP, &phba->hba_flag); clear_bit(HBA_HBEAT_TMO, &phba->hba_flag); phba->last_completion_time = jiffies; @@ -13335,7 +13335,7 @@ lpfc_sli_mbox_sys_shutdown(struct lpfc_hba *phba, int mbx_action) lpfc_sli_mbox_sys_flush(phba); return; } - timeout = msecs_to_jiffies(LPFC_MBOX_TMO * 1000) + jiffies; + timeout = secs_to_jiffies(LPFC_MBOX_TMO) + jiffies; /* Disable softirqs, including timers from obtaining phba->hbalock */ local_bh_disable(); diff --git a/drivers/scsi/lpfc/lpfc_vmid.c b/drivers/scsi/lpfc/lpfc_vmid.c index cc3e4736f2fe29e1fd4afe221c9c7c40ecf382d4..14dbfe954e423acc47d1b1c80160ff193783f500 100644 --- a/drivers/scsi/lpfc/lpfc_vmid.c +++ b/drivers/scsi/lpfc/lpfc_vmid.c @@ -278,7 +278,7 @@ int lpfc_vmid_get_appid(struct lpfc_vport *vport, char *uuid, if (!(vport->phba->pport->vmid_flag & LPFC_VMID_TIMER_ENBLD)) { mod_timer(&vport->phba->inactive_vmid_poll, jiffies + - msecs_to_jiffies(1000 * LPFC_VMID_TIMER)); + secs_to_jiffies(LPFC_VMID_TIMER)); vport->phba->pport->vmid_flag |= LPFC_VMID_TIMER_ENBLD; } } From patchwork Fri Nov 15 21:22:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876911 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 16475D68BE2 for ; Fri, 15 Nov 2024 21:23:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA8D96B009C; Fri, 15 Nov 2024 16:22:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C32096B009D; Fri, 15 Nov 2024 16:22:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A0F516B00A0; Fri, 15 Nov 2024 16:22: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 772F06B009D for ; Fri, 15 Nov 2024 16:22:51 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 27EDD140406 for ; Fri, 15 Nov 2024 21:22:51 +0000 (UTC) X-FDA: 82789603680.29.C0BB0BA Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf20.hostedemail.com (Postfix) with ESMTP id 4EC0E1C000F for ; Fri, 15 Nov 2024 21:21:52 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=noox43Ia; spf=pass (imf20.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=1731705712; 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=Dy1gfF2eVFD/Tcz72rvAOzLjHn7ysyv4CietmA0q798=; b=ojKIAPtj9pl9MIKbPb+bSz9UiHtkmpQJPubQZhOuSvZL2iGOIMC6oknuBSopkpnJEYoY9E d7gALkQ47g5/njKzojjtL6d11IIeoyYhbmaUN+eNx/JOffHW3hetr2fZj0YTHsZj28eD+5 uaGQ9JxBTn4uoTpn6/ZmNt0RhYkITVQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705712; a=rsa-sha256; cv=none; b=Fhzas0tKnO3nRB3u7oEwMYbGTXiv+O5kIdPnjbxJ1FrmDZFDqLGWj7l7nJeY4i2GbYMSUR bCJRzvkS2AaIVsxjV+G0IjDOrl8wDj6FK9PTYKW/Md1llawsxbe+68Yf4IOkD4FKnz8FIw Yo20fzM+9S1Fd2jIvE81QFqMaZJZWuA= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=noox43Ia; spf=pass (imf20.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 3830420BEBD2; Fri, 15 Nov 2024 13:22:44 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3830420BEBD2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705764; bh=Dy1gfF2eVFD/Tcz72rvAOzLjHn7ysyv4CietmA0q798=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=noox43IaK9YbVWORCWHfqV/2MVwxKsfvDX3VjXOigGPsIAiMak5TX9WjxZ3URKdej P/FLSpjwMlams/nnBrmsqiNRv/USEaAmRfdc7SPaE7Vpmg+hcqoc2z2b7doqNkw54W wdFLT86eEn0mVPHIwhGf7+XKvkRHVCQ9LgbyTw5c= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:41 +0000 Subject: [PATCH 11/22] scsi: arcmsr: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-11-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Stat-Signature: 3zeq61e3kb47ikap3ad38r3yqfppm4au X-Rspam-User: X-Rspamd-Queue-Id: 4EC0E1C000F X-Rspamd-Server: rspam02 X-HE-Tag: 1731705712-574517 X-HE-Meta: U2FsdGVkX1/5szGcVEh+BAsFfHby3agGLl3cnWzFmJ0jTt1ZGZPSQcSjWecTLnU4gijgRbDTPNlTGGIdDwgfwfY1ayuroXGrAD8DWxVxbV4+w1YqFQ6JJVTDkP01K5u5KXPOi+5n41rlzcJIELWscoYU20Gh2B5BoqzLnh1sHSbej3K0c35l8NnDp+r2RbeGp43E1j+3vPyEQgGSQP7NXW2BTrqbwO0mLSum0rvN3+7qSd/HtM/lnz0a0Mfl1YnluNro5O2gmOzjwp23ZJyf3AzXpufHe98MQ0ovOuMovVOF4bEPrKJMDbaloGRLDI4fflmLEXuHxoWZgp9SyG9Rj91oaGr5JE7tl59jItK7ro+QFqf2KpOTzkuk56/FR9ixRpIHM+J2NT3gI9gJdDIP/BcSP+2Mp9TcInTAezmIVG+ev0VXjqiTrLIWfRNNw7oUepC6ywd1Fi4M7kx04TZL9A2SarOOTWLfFODzzlo76SqLiFoXo/riiankrnOdMkFRWe9ILaiSEJobokZautIPlFT92twgMjvdvE4N5SKPyfN4Q6o9YrObywBpCfIXPSaVdFkhQzMDndel8csgba2rBCXibVmG64hE2U/XQODXHeIB8N7YQU3NVx2Gn4ECXU9A3I34/ggSNkD5ctP+WamrxOD3co7vFJkm6WKmF+VNxwhgV3DoNaTDWPYjKQcM0vE1EzcBQbaJ9V/K9a7vjE7c+YlwlnKgFf8velaRIC3hSc5Zgc4YP2GtYgGarRc8SdI5Dm8UxTnaYUALFr45GujOvtngUjQ0OLOz1Q/hOQhTn4p3R64udD69kdKr4vITL/RW/Xv3XKO23V2W5rdO/fuJ+mP8zbD1JXZBRa02CgLgzGfzNJzGjTg5+ZQOwkAUG/W2OUbYvkDe4LIIz8N2+Yrp7MT4jds4S68zvwQ4sLwKuPG6Kswr0XeOWXJ3OdtfBAmBmsSSdlKeMXRAG6VT4PN GGRUli1A zzdAwtc47Boh2pZSBhBYGFD5yBTDpWdKy1jhtQtBf7nkoQbU6kD4cS4wEXw5+uhl7GU8L+3JoaMqdHGfcV2pNUr9u8wtAA93VkoLBiCvoULlw2QbTTYHzuRDwA3V2KEEqJQGs4WekFjy2+eBraEyXFcw1M3IvqpYQ7EltqhArNHHJwAQLX7BDtAwfidqxMQ4UgYzDOjjLVTBVgUfU7W6HwGszwpeTFu1tdgJfuESetMf8DMqYzZuKaOLU5rlyZX87gVU0zDZtzC9xuPsyFnIuWlN3ZDokOgxgrYSSptLKg1XgyS8jQktAD8OFscb9fSFR6JRPDp81vdd4q9X1oQR8vsHaTm3HRxVL4QrpiMc222DaUpFYJZefNYZHuwWNs1T9n+eOriPqGVdTJCAJZZN1AYx++eJnbQ3+6IphRMPiZf4UioxcEsyZCOGF6pRwAKaXDC2A X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- drivers/scsi/arcmsr/arcmsr_hba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 35860c61468b02cdb59aa59376ad5ea9be60d12b..fd797e2785490839713f9242014f0adefccc6ddd 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -1044,7 +1044,7 @@ static void arcmsr_init_get_devmap_timer(struct AdapterControlBlock *pacb) static void arcmsr_init_set_datetime_timer(struct AdapterControlBlock *pacb) { timer_setup(&pacb->refresh_timer, arcmsr_set_iop_datetime, 0); - pacb->refresh_timer.expires = jiffies + msecs_to_jiffies(60 * 1000); + pacb->refresh_timer.expires = jiffies + secs_to_jiffies(60); add_timer(&pacb->refresh_timer); } From patchwork Fri Nov 15 21:22:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876912 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 99D1AD68BDB for ; Fri, 15 Nov 2024 21:23:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 643716B009D; Fri, 15 Nov 2024 16:22:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A32C6B009F; Fri, 15 Nov 2024 16:22:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3CCB86B00A0; Fri, 15 Nov 2024 16:22:52 -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 15BAD6B009F for ; Fri, 15 Nov 2024 16:22:52 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id C5E5AC02ED for ; Fri, 15 Nov 2024 21:22:51 +0000 (UTC) X-FDA: 82789603344.11.5C3F870 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf05.hostedemail.com (Postfix) with ESMTP id 70D6610000E for ; Fri, 15 Nov 2024 21:21:23 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=Go0aUNLY; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf05.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=1731705638; a=rsa-sha256; cv=none; b=xXYhbvEj1m7RgyBKt31jSq+SaXKX7cK4StlBHaqH5mO4fbIJQXWwX4HL0vrUlEMU+WVmlo Dko1zxTkL/qsfrlHYYgKSxpS/21PpdI587XPkHNd1EC+i1yw+F7k0HMZ2zyObtXaHpgKLv 8YRWwJCZe2WkkMJfnjHdSYbenNvvWkI= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=Go0aUNLY; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf05.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=1731705638; 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=KRAKVqkmYHFKsYpIbPFWmWMGYVvfzvIpOOiOmhExdwo=; b=j0OVKQWGFnbFaOzrcXJKE+qUDZE48WqmitmxCIXQ2IyaTYwD2stJSNZB5D/F6k1j4IWhIZ 0v5AWG5PDEdaJ6ua0RDALulKtNXpMhJ8VdjcaudCv8+shSbbE5Ro+KZplee7rMqX5rtYAj GBvb9NTLZuBhOZ614YwayGpYpSbECNg= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 6E2AB20BEBD3; Fri, 15 Nov 2024 13:22:44 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6E2AB20BEBD3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705764; bh=KRAKVqkmYHFKsYpIbPFWmWMGYVvfzvIpOOiOmhExdwo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Go0aUNLY+uBRc1gulf22NPnT4wn803j0Yofkqbh+DxXkzhV99tx8UWceKEAkUZyjD tejuZgR0LF67pK/elmBAeNnO4NhzZ4R+VTUBXRegmJhIlArTFy4HXwc9kGMh3mQr02 7PyIpQ3LVnHfWOT4NY7AkEac4yki6LEIgx0W/av8= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:42 +0000 Subject: [PATCH 12/22] scsi: pm8001: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-12-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Queue-Id: 70D6610000E X-Stat-Signature: rqqkc56k7nikwsr9osa64iojmioma13s X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1731705683-745767 X-HE-Meta: U2FsdGVkX18aRZML1wBzTRHesUIZy9WtvU0+n1WON0b3rE2wZ/XDfVFu4NKRiJYbvWKHwrSJGBcZdfsIWyEsm484QGYvO/bPOev/APdD0JSEnO0kGeiLtug9SBZ/nLmwdTKxjjNGtZiSOK1RwpaEvRfTFYzpvKehJl0riW5l6Nqqh8WGZCF0cKR+f03v1vQbuuI1wzFTSgmPUcIRkLzAm3PrXOa3bf7qq37juLJq0yl4DJAlHNT9c0AVlF7RypkntCQaBlO98L6VCGE5KWVH2ab9CNJcnp7gNYsqkDqCIEwjoWradVDQa/QiJXdcTUj9Dxzj1Zyxqp+tvO5TFn6md3v/c0MyHpBioAvpMnNAvbuilX0pfZ8keNDmKBsn8EEca0wpqdSlrg0QGTlXf8VX4V0lZ5fWUdzDiTdlpb2f0dyTWlonjlaC4BQctWZXsGmDcjQm8GWGTXvrq4silm/DqhCswffDEJOlkVtx9I5UB0TVNtaUpfishDzEAMCQdjtKSOlvkZyMPIcVYTY5Mn5F7jgApe2MlkgeCRyx0lNmA3m3dB4gY0e6urozIliJxJ/QK7eIum6vG5egKIFRIqyP4UDupvynyfY16Plz4xoeDwtkN8wCCfJz9g8dr+Utox7yObZO3mxDFo9tS0Bm+lmgiHz7tTGQAI5uuyULXObSW/wNAC7VkAMe4RhEu9jz0sgmKy1TldL0BUh9IC3dfr4pwUPLUaqLOJ000sQILlXUquVo7cpihYR33Kkbr3/PRU4+jYoAA4SfIf/TpoPQXHNwPoUDndeOAAYIqTZAGk89pqdrPhRBAgeoHyFaNpHw1K6+3Zq1uhHhLMDNjvZOvs9nGIEaUIZGVnPUd+Ju6Y3JQWkw3LjPv8BSwguG4hBCbKm79jbuzsPkKQoUE6zw3Tapx288yP+Pfvu2E/eYVsQfNw6xcr2JnVy9PiJBKnaozNb7QDGztodvP9aseiqrCEV hHC69tZg BT+l6W+H2I+qI/H49AEOLigwi3AAWYARmcaTB/vOIhQYf7n4z5z9Q4+6EMfvxR9+q+jo1ePQ/U7xtUgiEYHQW+2Cc+qC5PK3Na3HXgLpQyVkesHtixZkxOmtivI1D7QhTLu/naPIW6NKxq/HtB9j/ccsfwA/CQCDgghimLEby0x8OPbAty/Zi7QymvJOnlCy0UALRpr7HZm0P8HrxSqyyF+3mttUfmsOiIL5g8IBa/TzakdVWsoCevzyz9cKmFsH7m6kAwTLdN5wrfEgHDr6xn0c5lcYOKFUW3kRd+G7X1pInD3827QFyHx69ZYz4LhN6vvkyCgZO+DOKgEmnSafDQquBjidTPc9pk5rQ51hJY9J3cXDFXIInSTrQlCeG02aYZJ0v4YYrM9vq+8E9VxU0tkxVFNrCVC5SQMjzp9+Y54v746JLbxmFK0/aBQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- drivers/scsi/pm8001/pm8001_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 33e1eba62ca12c2555419197ecdbebad817e4a6d..be88890716cc152b4687edf5e204d14bd177e188 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c @@ -734,7 +734,7 @@ static int pm8001_init_sas_add(struct pm8001_hba_info *pm8001_ha) return -EIO; } time_remaining = wait_for_completion_timeout(&completion, - msecs_to_jiffies(60*1000)); // 1 min + secs_to_jiffies(60)); // 1 min if (!time_remaining) { kfree(payload.func_specific); pm8001_dbg(pm8001_ha, FAIL, "get_nvmd_req timeout\n"); From patchwork Fri Nov 15 21:22:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876913 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 6123BD68BE0 for ; Fri, 15 Nov 2024 21:23:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F1AA96B009F; Fri, 15 Nov 2024 16:22:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EA3E76B00A0; Fri, 15 Nov 2024 16:22:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD3C66B00A1; Fri, 15 Nov 2024 16:22:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A44B66B009F for ; Fri, 15 Nov 2024 16:22:52 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 620BE1A043D for ; Fri, 15 Nov 2024 21:22:52 +0000 (UTC) X-FDA: 82789603260.16.1549F30 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf11.hostedemail.com (Postfix) with ESMTP id C84DB4000C for ; Fri, 15 Nov 2024 21:21:53 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=b3Yj+H9Z; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf11.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=1731705591; a=rsa-sha256; cv=none; b=xheDx79ymwoXffPSE2GUY6s5Es2CnO/ODRo+9nwDzdZSqmWSHwhXc3KCogqx6wzJPh9JJ4 NDhz7DokyRZHA/b5m/gU2zhj3xf2AmJ8DmukGPdGAzGA1WobJZpG4hTSbFxdXVL4TWpdoq jjuHtJRQ4gYfyyJJueVWS8b3jOQ825M= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=b3Yj+H9Z; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf11.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=1731705591; 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=pCX0EpdqmyNkdZPLk4Z0q7m89NufhvHb1Y+2Mrmnnrk=; b=ardPS1WItmVGAGsWQgt58QJEOMo9yIXSz7RR/Q2o1yTIK/x70wnLfOpVhEsEbLM06pzHrs Qixm0QA/obXrVIZK7cJVLvh7LRUqcmpJkpXQumkt0kFimxL7XKqBEBM9kQgTzXYtNa+pxS 46v+afiZ0faeEQbRivXMG0M1/nG0OM4= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id A3C1720BEBD4; Fri, 15 Nov 2024 13:22:44 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A3C1720BEBD4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705764; bh=pCX0EpdqmyNkdZPLk4Z0q7m89NufhvHb1Y+2Mrmnnrk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=b3Yj+H9ZO7cPCrzGt7MCUXvYWastksRinkPQTfKmYI5YUC6RTlLxuIDl1dZ9vx9cZ n8z6j+Y7jAIeRkA5bNrxlUKB96Yq3j9HWe6QAwTeEGIBKLrl97e7xcYOgedDgu8E7m FFC3fk0sFJpd64ZUMyFxpOhkKDs6flnQbO0zd4cg= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:43 +0000 Subject: [PATCH 13/22] xen/blkback: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-13-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Stat-Signature: tkfucq45kt8mum65kqadpj6aw71why74 X-Rspamd-Queue-Id: C84DB4000C X-Rspamd-Server: rspam08 X-Rspam-User: X-HE-Tag: 1731705713-477141 X-HE-Meta: U2FsdGVkX1/tGUj3dXsc7hgCUWaQz1MPdnq8OjliFXjy2YBw4DprF2HOoSZlDvyXIlLk2qo5Ln8gwsO+oiVosoXqEjRyqHl66PbugcQUJapMj9LuhE/AhXRkOxSsDHotcveoT7YywbZEVjgv1okuDCUKTcZr3Q9ECtK6xgMnXPBl2hxLTWPjLDl4Ozg2cq5ZmEUEFEZ2RE2vuMFwnf8kkyIDTlG7uX1SZuzgFrFQOjig8i3KF/u6OxZAtlPtI6woexw0RMjgAAr4nqHSxCEWLsxQQ+HtlNa80AtQuE98x5c0cQRHTagWyWHX3vACyKECQ7jlE/L2/zseEklxZumSq1ceGO3kugzZnRpmzf1SuPXLqA2yxHOggJkK5Ek5I0sfJ2jOpC3xYFAzE4XZNkW8yHZp+vYjQcIJZNAdzbJmi+L/9/O1OATJeqrq68qpbKjI+am+6hRys/glHt2IA61razDtKbMbh2jFLaX3cfSNfKpu1vS3a9BroG4nDpheRkftiNtFpTu/oyJWh363fibQCcOUfx1mV+rPQGZsChS9ncWTsvDLRydc0CCxWN8U3mVM1TLgrkwTkU0untOuxHJx6iyIC+U1UIQRsJXes64O1L6JtZF3lep3DPOv32myFtxscui2EQMmY+QT863DhI6qQwaBbFlwKvto9TBR3GsSXxOo21b/HFTPzpQ4fAHBRJDeAKDhKdmCc0fr0XIGrnAcDOu06Q6vP30c1x91YRu+z6rO2keFuQukp3/cFRlgXl0hVlilLrqL+7bb2/cWZOKocpcGcxoOKy2Wbb84/c9lkex56rjnAzE7Vo5JtYZQWKojcDMsC2UWOLKnF3mFx2rG0O211gYof9PMTaCyaYTQZWa+LGy8r9mklaOV0Y4ULj7FbbAnJ014qKLa+mHVytnUbT8QYn5uXYXxw4pIRc5gRdpsVMt+uX7TVhADR9m71uZJxdgHkfvwhqxBQEn0bbW kCLhG2NZ yJG/9W6sXd9DGKQbDZvEd2vx++hyOFym1mYBJMHiIfjBbQAoobpMokop3sImARvzmacv1JUnYvC4Kj7cQITeRAIAcW49/9r5Dl+ii7/DUeQ/ovlungMBtQSdcXNUSoS+95tGPGqb8reiZzXrmOy1J8NKk3ChglNg9U7LG5YbK96hRavuCsi9c2MKZrvxr2qKNAGnr+StZeYP25Li6PZVHLX0cb6yliZBhr+PUQNClmosw6oozMSfRo7l9pp20dklcbrZFhHUI2fsO19+YgHBcmtazDnuSu8Kax9GJqYp/ZLpON+BGu5ix6oU1BiDjyj0EoroKHgRARrgvTHDdTOwW8hk1a5ZcNGJcLfo24IX8AGfsgvyWJF2NlSi3ZSOPfFbYj502QK19W7LhV8vR7sPSX0rnfaNgMxNs5plsCgdkA+9KBFatIPLqnrmeMg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- drivers/block/xen-blkback/blkback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 838064593f62b75f3d937c0c041ea78dedbbaf84..a7c2b04ab943de9cbd69b596aad177a0534f7762 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -544,7 +544,7 @@ static void print_stats(struct xen_blkif_ring *ring) ring->st_rd_req, ring->st_wr_req, ring->st_f_req, ring->st_ds_req, ring->persistent_gnt_c, max_pgrants); - ring->st_print = jiffies + msecs_to_jiffies(10 * 1000); + ring->st_print = jiffies + secs_to_jiffies(10); ring->st_rd_req = 0; ring->st_wr_req = 0; ring->st_oo_req = 0; From patchwork Fri Nov 15 21:22:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876914 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 4402CD68BDB for ; Fri, 15 Nov 2024 21:23:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8B3BA6B00A0; Fri, 15 Nov 2024 16:22:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8396A6B00A1; Fri, 15 Nov 2024 16:22:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 61A046B00A2; Fri, 15 Nov 2024 16:22:53 -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 32F9D6B00A1 for ; Fri, 15 Nov 2024 16:22:53 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id F39C9403EA for ; Fri, 15 Nov 2024 21:22:52 +0000 (UTC) X-FDA: 82789601664.09.10D54E6 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf30.hostedemail.com (Postfix) with ESMTP id CD3A880003 for ; Fri, 15 Nov 2024 21:21:24 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=DBa8qjnf; spf=pass (imf30.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=1731705533; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YTcGWD0h0ZDgyuZTU2DPl12ZGyATdibDkhzA92Hlf6s=; b=6veteZMi4YUEHtycBRqP3qDMEObm0hAQoKsFNoDzj9drhvbpmt/hWwqUlZZsJWTjw8QNnc w5ooAWPiywLo8wAukSLz/nUUO0n26P+yhoeo/pEvKMgJDl6xrGtm0/CK2uia13t+wfRgRK kZH7v2TFDqEfcw5Q42VR5q4aGWM/Zww= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=DBa8qjnf; spf=pass (imf30.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=1731705533; a=rsa-sha256; cv=none; b=bkpzcKDBoxPavm9nTarkdyn4bOWbPCxWEStM4nWoqtj+wzV3Ry3i2VAcyfxndNGqoMrW6+ gJVLsd1VbCBqey101t8aNO2G5QQyTknC0z1cQZkdplZQLj3Q/oJlV5O7+pzNyFbvkIb6mA ci8TnXwHPUCpSpjSRWU73D5BmJEHnuY= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id DA1F220BEBD5; Fri, 15 Nov 2024 13:22:44 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DA1F220BEBD5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705765; bh=YTcGWD0h0ZDgyuZTU2DPl12ZGyATdibDkhzA92Hlf6s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DBa8qjnf5MNMswOkSvV0JQ0FZ5Ed99ngIFRkSTMDnQu36t8YmBRJOYBHSU3QDj3se Fc7TuS2jcyT4LTDRPo4wVBYTyNbI1RA/bW4apXI30r4Q7ECcxM6eooQMWk2K6CFIVq CFABxdq7HpjQyK3+DUwbjslOaeOI5LwZ/vHYLMt0= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:44 +0000 Subject: [PATCH 14/22] gve: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-14-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: CD3A880003 X-Stat-Signature: 3do8a1hdxxf1hjfuwwmyiiai7ceted9e X-Rspam-User: X-HE-Tag: 1731705684-426275 X-HE-Meta: U2FsdGVkX1+9ENEhmbmV4EMBJ89EZwmc3NXfXR2JmXvkPWZQuZOJWSC38+fgCgyV9UhjM+S/AfQ9mVfLcW70S7ZmeG8Hw4sT11In7b7RZx4SpTF5u8D1wtJwf+Qooqbh7J+5w8z5ZInLrqvn0lCYLHr3zfKaQSEy8tAwupSXOiIuXSxlND56weUVLMP4qNotLrqgMLyjDKIUBbL0K2Dsqz73B/Nvv7ya9e9Q9aOTfWqx2aVfUBGZAaLLX5lTvznj4h5lIsmBVdyywwIKohYJdAj8iZMphu998d3dvdHqGTMZPGwiAIq9rVluW3taVE8MNMdC68FbQ19hOoY5DGZ7RK6Mzvk16RKcfjOKi8aGDpbgMZnuH0kIPzEhJTd1DR4+0YhFlx2IqiBaINUbM8XLW+8KiAKLkLsbMNPcFOjWUWMtn8mMf/Z6HW+NI+OyOShAXFyz7b6TlN06OK1lQSnJeD35B4bS0YIxZ2F5vngrnEJC9uvNbBr0r4c3r4fxYbQf6GTcFYRfiQpWtDI4zBiHXdMk3B8KLT7kniKmmGBz0LypUnpOCKgfJ7X+bNWSvCXr9091wEJQ1x8/N2txBCqJBU89OyvFefU2bVsQOOWh8S1OZCiNZEuEYNzkiRwDW2HYGuEDKzL6suqFrWXDPDfHoABma8Mz37JN1TgnCIVRO0kkmExE8/VhpCYEM2wB5GqA1STFgwpKeOYSON1oZUEl94AtInZcmN+apizUUNr6uv6Bf+TkRPrYc6vsCsNwhPdJhSxqYCFk9jmykqoQ4MoJ5NRUK1skop0HpP9WWxmRQfNxEKo5gvMsPNubXXzz7lfwa1vG/56Nhw4o/4daGgJTGHtlzSMFPEkg9TvCK2Nsg/WRvn69u6hTwlWTh6j6jlctrfs078z6khaPvrhNUsdhBbmgZ5IzOw2jW5fVYBSIjt0+xuQoQMxjZ5t88g5bMAUruYZPTJyzUqGwah9AtL4 FlXhHEci iasJkDr9dAPH3OgeoheQstnRoYXigYSWI8sSGqTowWP17Q9rmjDG0u8Juv8ZG9j9mZtdwt/4vQTXdQQt4Zlyq8ZdSF3WbyoKSg8CX0VT+eCEmRVQKPcItgg5V0z3xvrHMi96g3RAHV4RaQPbAJgszjiyI6q+J+s3l18rh/9Epn7CNkycjpmZHNaRrksIn+OECSQjpLRECfu9vbhfn3IcYsnp0JLrppVg2OBYoj8qEVuMQWvV87Da4sMQdeFcq7bRTxcOOxhF8pcjliROnsqeOmoNjMJrch/+28AI8D3dboxiD/ercXsvB7xr7ZnOTn7XfBZViMf0YtRnobpHgPb39nCVnWianbX0axgjhuw8a7qayH2RHgdXImWXKqy3l4VyYUWcUbgfHKmQ7WEfAA0rvsbFsCwS04+7NCnR7dIFqn17rHNmKUGkQBelB/VwsfSx4SVPQ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- drivers/net/ethernet/google/gve/gve_tx_dqo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/google/gve/gve_tx_dqo.c b/drivers/net/ethernet/google/gve/gve_tx_dqo.c index f879426cb5523a7e150f363b5e57b9d472b5817c..394debc62268aadf2579f9b516e045cb48287e7c 100644 --- a/drivers/net/ethernet/google/gve/gve_tx_dqo.c +++ b/drivers/net/ethernet/google/gve/gve_tx_dqo.c @@ -1146,8 +1146,7 @@ static void gve_handle_miss_completion(struct gve_priv *priv, /* jiffies can wraparound but time comparisons can handle overflows. */ pending_packet->timeout_jiffies = jiffies + - msecs_to_jiffies(GVE_REINJECT_COMPL_TIMEOUT * - MSEC_PER_SEC); + secs_to_jiffies(GVE_REINJECT_COMPL_TIMEOUT); add_to_list(tx, &tx->dqo_compl.miss_completions, pending_packet); *bytes += pending_packet->skb->len; @@ -1191,8 +1190,7 @@ static void remove_miss_completions(struct gve_priv *priv, pending_packet->state = GVE_PACKET_STATE_TIMED_OUT_COMPL; pending_packet->timeout_jiffies = jiffies + - msecs_to_jiffies(GVE_DEALLOCATE_COMPL_TIMEOUT * - MSEC_PER_SEC); + secs_to_jiffies(GVE_DEALLOCATE_COMPL_TIMEOUT); /* Maintain pending packet in another list so the packet can be * unallocated at a later time. */ From patchwork Fri Nov 15 21:22:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876915 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 7DDDFD68BDE for ; Fri, 15 Nov 2024 21:23:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 26F596B00A1; Fri, 15 Nov 2024 16:22:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1FB7D6B00A2; Fri, 15 Nov 2024 16:22:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F17A36B00A3; Fri, 15 Nov 2024 16:22:53 -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 CF85F6B00A1 for ; Fri, 15 Nov 2024 16:22:53 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 900F21C6113 for ; Fri, 15 Nov 2024 21:22:53 +0000 (UTC) X-FDA: 82789603722.02.35B9372 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf29.hostedemail.com (Postfix) with ESMTP id DE3C5120002 for ; Fri, 15 Nov 2024 21:21:49 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=EeaKXUId; dmarc=pass (policy=none) header.from=linux.microsoft.com; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731705683; 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=tK04utDeNCseuvXH6irwCudSXxUYSbugurANWfhj/RA=; b=nQHH+g1zxHAUP+pUi20XA3H2VDuptoCbgyOJGH2DBsOs5FgmZt77hJA/v87Qw+29TzXUaU S2sta76oJY0j2aQkzlXglhCyvr01KHzE4B5WUZ83T71fkv1cMLJG83icJO+gKL8iN798I5 zBhvOodO8B1LIRk1hAHlUmcCgoxaDFY= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=EeaKXUId; dmarc=pass (policy=none) header.from=linux.microsoft.com; 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705683; a=rsa-sha256; cv=none; b=Td79HspT+6qRX88A24LB2Xqsh8lskL7RdKbZlCfeWjPVxbrOFjvDqSXTkIikh65xJ9gV/U xN+/slPryf+BYmxKpusrMCYzNg+ykUzoHI7UfRyjK+8JrwrTcglstcg6c+bMcAKc/deSYN 2ixfbmL37+jE63/4sCpWXvGfFcEmq2o= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 17D8D20BEBD6; Fri, 15 Nov 2024 13:22:45 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 17D8D20BEBD6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705765; bh=tK04utDeNCseuvXH6irwCudSXxUYSbugurANWfhj/RA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=EeaKXUIdhndTAyki8bUakndKNZ8kLOJGUUMqUnCCfo6p9a/zgVkYL/LMfKrnFK+tG f7KXDookDfXLSuaDjHu+S/m6N1geUmPHCzm2E8/XUOv0uy4oS5S0wjKzm7GAQ4iGTZ d5PjcF/6XEBO/WEPS/wh7fexVacCMlg1D+TYznuQ= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:45 +0000 Subject: [PATCH 15/22] wifi: ath11k: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-15-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: DE3C5120002 X-Stat-Signature: yozxu3gfpfysbmqjxspy13ytxmnadr1s X-HE-Tag: 1731705709-877694 X-HE-Meta: U2FsdGVkX1/xYZecHenekXU6hAZbay/RP5pj1B8HT43Rl0wl0NJ0Ap25qtBAUFk076/srW9WjMSE9VjyMHFXpaFHcqsAevqQ5lCOhFywXc+WPPZNp4J5BV8OO4/YooZbYOraOCAHbxhp3OhmAyxyxaz13JUykIaGGTeSOW0aC4huIE1V4KvDciT+2QghvF60rx+xf/VrJ8M2S5TqzQyG2YMJZFTBaEHXIF9maok3A/aoMlgfzn/p1y7A1yJzvgKJgcSHy5CvtAyBHXZgf/btWnzD0MNPQfx+szNSyavhTlTcqGborCeKGW9AHj+5MvNU1lC6wdn9gD/FxkeVs/BPNsjt4Iah/8cG7kc0nmNKxWBi91zZf0gGDixn2dRE2x5MsGynbss5vj31UR19rK9vACmvwnyEKuLPWj63cmsMKBDdDHkgSEZlUNGQR6WF/PburJmRpvnGSvRDM/mi6kR7OhTQZJAPa4kIyuFD/Tr+LrVz2fiQWb9gfVQGyHm4jO+pd3/fVi703B69K+UBLmTT/HS1bMZ1ctNPzmMNieQzoJD9VOXQUzg9TIwmjp0555119MuxPwMxQA5pIIxyhIEB2i5bH1NdRFxBzJtaHEg4ViWZ0LhfZXzZsY/YkCBa6alpx7VCM0B9RE65IpGREmOhkyqPEXLJFy0j4tyG5IJKKNpk6UtPCYKuVBeelUSmN1Dh/ey2pZwUNR4r6T9KXxRklyZ8mOYUWn7FSIzz33ocTT18PZ8Nl0paHyfad4Gp2tQTKwkS+Rse2u6YxNisHooLVf4d7rJZbYEN6EzCaTLzQbi7PfCZffeFYkC0qHfpCGPnPoMFy9Sc8Wv7mJNSGprafyvafaMqzqn2A8w7KpJwbTc+H4AN455QlSyNyUiwANijGIYzqTMtgDN5pZIeiccYmLtDE9xmzItoOnFPh0QO1CzU2fMPfZs3PkQeE+LdA1/dLUUsM2zPQfE3P4HMgf1 pnGxdf+i pZ2orLvEU4ofDjTDxV3lgt/f79Teb/I/AYXyUhOrK1iCDvNyAByX04BDQR4fgYds1sJ0HPAQQehoAnIbsC+PMmWFtspvfKAfAQEzAG0W7/c+/0R6+x6ZxSwv2erCRudN+nrDksnqXho7fG1g0GGaEgsrPGpRK8VX9G4lAAyCLgcuXt614hjaD/K6cz+5MpQifzsVLl9lrMLA9+HqcXovEs/qee+xBiw11/C07yyVqIbf8tZ9or+lgWq/3yujrhJbQ6qkS4HCa6ERfVRelmOFGa3dGcoqfcVfJ0i72jwwbUUncsFFJ5oREIaWe9+Sn9NA0bsNUWJfhb3vqdmJRi3zK3n86/Yu/dR3y3QfxC47Ae+Flpq8V7aIed+SaOGjIp2WheuCZRO07OzI/oU8Jeo74qFkLbnDs4ACQFi5uswHkhLno+nGk92xNK7qC0BgNt1mToxoT X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- drivers/net/wireless/ath/ath11k/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/debugfs.c b/drivers/net/wireless/ath/ath11k/debugfs.c index 57281a135dd7fa6b8610636f47873c8bba21053c..bf192529e3fe26a91e72105a77b4c6f849b905ec 100644 --- a/drivers/net/wireless/ath/ath11k/debugfs.c +++ b/drivers/net/wireless/ath/ath11k/debugfs.c @@ -178,7 +178,7 @@ static int ath11k_debugfs_fw_stats_request(struct ath11k *ar, * received 'update stats' event, we keep a 3 seconds timeout in case, * fw_stats_done is not marked yet */ - timeout = jiffies + msecs_to_jiffies(3 * 1000); + timeout = jiffies + secs_to_jiffies(3); ath11k_debugfs_fw_stats_reset(ar); From patchwork Fri Nov 15 21:22:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876916 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 57B5BD68BD7 for ; Fri, 15 Nov 2024 21:23:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DE2D36B00A2; Fri, 15 Nov 2024 16:22:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D6AF66B00A4; Fri, 15 Nov 2024 16:22:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B96BB6B00A5; Fri, 15 Nov 2024 16:22:54 -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 8DE776B00A2 for ; Fri, 15 Nov 2024 16:22:54 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4B3941603CC for ; Fri, 15 Nov 2024 21:22:54 +0000 (UTC) X-FDA: 82789601916.03.9AE3CF9 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf20.hostedemail.com (Postfix) with ESMTP id 67BF41C000D for ; Fri, 15 Nov 2024 21:21:55 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=PrkdMSJs; spf=pass (imf20.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=1731705715; 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=DTjXQ8JEnxKHPkRfiey8gv8xkSCkh1L+oMakOx6bumQ=; b=TXzjImJqls2FfQasqZlF7phPVnP5UJrj0L9T41qCgHaXSimH/emwn/Abshlog1113pcpuj lPgiiGGHi8EDwVdVY7TZj7Tl84/GqHZnBTw7zZc6LyAa0W9kccgHSZwbWMJQazRS63GPM8 A/jB5Hxy7y0EGAKzGfn1H0+tzGMoKyw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705715; a=rsa-sha256; cv=none; b=3I2SglmWaeAr/Ebqb2VWLO28Hmbg4uw8j5wuY5B8umdoJN4obOFso+6voVr5fYlafFfq+5 fCXBiKzzBvqgfHcIyOlwkhAkeAdUTmudxqNmTUbOMU+1kqxihtBYuIQi9zM7fJ9uGZc14m 0toKnV6MLChhBwhkV3e4bLaP5h9pEQk= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=PrkdMSJs; spf=pass (imf20.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 4F33820BEBD7; Fri, 15 Nov 2024 13:22:45 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4F33820BEBD7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705765; bh=DTjXQ8JEnxKHPkRfiey8gv8xkSCkh1L+oMakOx6bumQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PrkdMSJsCXq7e/LVXAIqADh6VOx2LSK3q8Voqjd439eNhh8b6N4u5aB1nfKzAe2Tm +kT+vzsuhI8O0/+YRjBVlaEQ5kmFrot1X5DGJclM8+YlYZkjA4xQVjB3ZX/xX3Lrsj FbrAa2GDIV5JdurdApM8LMcIFqaWmUwvCMzOiXGc= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:46 +0000 Subject: [PATCH 16/22] Bluetooth: MGMT: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-16-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Stat-Signature: upb5sjfox6fhzua65xht6nz3aa58z4jb X-Rspam-User: X-Rspamd-Queue-Id: 67BF41C000D X-Rspamd-Server: rspam02 X-HE-Tag: 1731705715-13034 X-HE-Meta: U2FsdGVkX18lC0S9Pc4lQLth64heDTpcBbdk5IvHa17NAwROOU/jn4Obs+OXyAzjp2TcJFq4/G0YJlktUyMuUB092GFBtNf6OIbf4QHOTrLt6sO1fCE3MJVAJQSGFKNV8wmlSrn61pjflE9k3q//rC5OIN7KupLHXPLl8D6Jp6stnFoIzbzvcj0qJdtMYPpnY0j/eNmldxi4Xi8YC8ISGcdQ0IEt8hp2/0o2Pn94zhblwWidxvPucYIdTbVU/t7GZ6wruZbUnQX/FSAF1z91Ogzxcc66CBN2G7/pSgL/2MkitsNfUZrBqSP8oNiR/Vyzhr0G5hhMwDj06+K/F1oCoqwix2JJ+6Ef3QKQSE/5J111OpBPGxeFWLHdCYSaLQqQTfCnSwl0EbeJkJbiSiIvzkwB+L149PRKR/Xu+yF8Gf/59mXZHbdvM3FOQI4NizLrd0TALmTOrjA3u5Wk4k/QPSa5u0FgPnVv/OnI/4yOZ9QcPXODKUclv4gaAlRCcG47T+kzKqVrtixSyLe1lnMGYY6EGqY0TK/WDgOtu2eN2V0eiBsgmK+QxLInb3qtOlK5S/HiHvy5flcBXtl+ZfC9Ia+SvdXotf/Ju/gdm+BEJ6HsgJV8UtOha7a9iLr02yE8/CBzNphCtsYKv2Ad94u3mHF/t8BphjQMSmVeFRKVjlHVcJXJJ7Yp0GKUt/0OuKM10z6HhHGOeBcPEOUU/TDgQQCnEoWZg7xOZ7XJAg9fTj3/qwiZyZWKTtBbXXEUNOGeU5ujLH+3MmQGDz/9pwfF5jVCit9S0jqWbJAC0GFhRESFJSSgKn4gQQU+gdZVRoSMrlChJuc5BLy+wDLeN3uq27lRnikHaGr9JSJBuKKNMPsTitcSukPvNIUY1c0AWH896sOHQRBOxXoyj9LROaIrJgA+CozGTUeKLdItuEozz7HsNm5gn3zwyQWjdvE98J/+9C2IsUNmGPzyvikRvSV asM6ypgu 4xE1vpDAjNEVIgWQwmm0DUgbPX0YKmiF9p/F7bqo+EZqWESIcNVhCypRSGHaBLwdEI9gkoGlsCboxm8Sc9wxXLHTiHY8xjtBf2HlKrOqxRBYUiUeJXXtAwQcMoYrwr0PYTnt1j+DGyx1KHUzSajXyqO+IuZp8oqhrd2JUXr1fZ3RoyYGmM1391twpPQshNJmMcr9D4UeWJZUQTRwXry/DzBueMeDUfkl0gFvGYQ3waaEavj3s6IbVz0jENqQDiWbrl23/HTE3NbcyfRT6lXpL0tgrz+UvN684DoZwJbO3u2rAJV+gnTFFEqLJ7lzP+NLUouHlgwiox26gyvUBifu1rirsRORiYiYti0iwX4WP0XPAu6kjskZMSj2AVVCzHcgXa68I/BoE+mWfXP1JSz0JJTYPg9ekWSIstBaWUlh4RrcAOV8Ru3ryc5vCXB4QSdMMrNp+ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- net/bluetooth/mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index a429661b676a83ec2d34ed7e228195f39a153f9f..ca89c26d04ec64869e6b99de099d343f4c548ce5 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -209,7 +209,7 @@ static const u16 mgmt_untrusted_events[] = { MGMT_EV_EXP_FEATURE_CHANGED, }; -#define CACHE_TIMEOUT msecs_to_jiffies(2 * 1000) +#define CACHE_TIMEOUT secs_to_jiffies(2) #define ZERO_KEY "\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00" From patchwork Fri Nov 15 21:22:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876917 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 34A08D68BD8 for ; Fri, 15 Nov 2024 21:23:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 66A406B00A4; Fri, 15 Nov 2024 16:22:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F0E46B00A5; Fri, 15 Nov 2024 16:22:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F9226B00A6; Fri, 15 Nov 2024 16:22:55 -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 1CF6C6B00A4 for ; Fri, 15 Nov 2024 16:22:55 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id DE17DA0372 for ; Fri, 15 Nov 2024 21:22:54 +0000 (UTC) X-FDA: 82789602336.27.C5FF58C Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf05.hostedemail.com (Postfix) with ESMTP id 969B9100022 for ; Fri, 15 Nov 2024 21:21:26 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b="hCMeIw/D"; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf05.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=1731705641; a=rsa-sha256; cv=none; b=WRz4XiyyFi7sCzlwFRW2BQCM6K2D8NDexQ9yecTesMBOqbk3rntlq8xvs7Wy5Se3BZfik6 9YtBjFGpZv7T3a3k8Jfjyqo5hrJrwrzhcz6z4Xn0bpnaZ86vn1HFUASjWBuClBvJOW9KNM k9kYSezRHlFlxGGBQ7NJ1ZF2/BmU4UI= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b="hCMeIw/D"; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf05.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=1731705641; 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=kyIMdoD81WSCHIuRs3t1IxAuP6vGJ5R59VD+r/6KKK0=; b=YxIRsHIjkvG5Az2SuL5Gia4930lLNLe5p4wFUSqzFVrjL/EtwQiNtHY4cgtkILZdKuC+8O H0jWvPKLc94uYDHfG5kRh/HKTjUFoB+TzGqfbsNHrFBtHD6IVDlTCKi3JxuhsSB0TUoLw5 7Wro9NYNVILfiXJFlFPZKfzaJGwQlV8= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 88E5C20BEBD8; Fri, 15 Nov 2024 13:22:45 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 88E5C20BEBD8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705765; bh=kyIMdoD81WSCHIuRs3t1IxAuP6vGJ5R59VD+r/6KKK0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hCMeIw/D2+NTRMQJ3FRDpZj2qT/7FbCaDMS9+XIuVvW9RIzS37PIUIxd4jF3sKpOq ONruuQqONZh6MCBIYTovcefPeKanNMMCVBGfAbtnor6PdXfG/kDS1Iyd6np+7CKiaV BV9SmXmoDsx8kPuPU+1F4sBj6APCWtu0lORTDJ94= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:47 +0000 Subject: [PATCH 17/22] staging: vc04_services: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-17-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Queue-Id: 969B9100022 X-Stat-Signature: srqzmxwcm4bdx764murm7ys8hqxronxn X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1731705686-148736 X-HE-Meta: U2FsdGVkX1+1KE9Grz263TSS7HK1ml3X1YP4O3eUfJMweY6qD9oApFqqKLjOsgmw5LD6fvRsBI6GIf4Ssbce3O2CERhvs+YH/z+sHjmXbKkUkMLbD1kJQQxKwsDpIQqICVE9SmEqEZpokOuZW0hZrw4M7kFZqcU5p7ETxAb59Dq1BC9pM3w+W5jPkxAOkFNJ2hDhuTvG5dtc2PdQIfHcI+6dj+wQp3cjNzLKJm0Uoi8KVQnRMo6l+PeYWwXxTSEXKBRmfXko8lhwPd7MtzVz8Fr43oS8nEPplEWmeMS5tY+mJolxfkDhcVktN5nGqXxtQRfBov1hlBnH9UfP+AoBZ9MCAOTLw4qs7z1BqW2AmCvQo/8DfjJt1gPgYoq/Fd6WGoiOx48kIra/XKZPtaHSfEwaikLndHjChvX4DlFST3atJvYA/NJhPkrGEc3syRN7v2QCWf52ElnZmIIBq5hR0dX6vkIIQj+hHuHysa8pnapBqvPNzO4zc+f8F14ENU0LZ8Fmeq+Ijq7EWmjlOXSGalmAAr+5KuyRt3ojTlWXeEbgbMtEMt61DwRbIHxSvPpSKEoc/nL8KOAmIk+n3ksN9/n7dd7DIpsCc96+e1tGTpXy+8i1PANOU9BvfcXVv1Np3f1enfBNKXpq+zbuhHQLUWhGEcJBxLHHaRREAao6bmmNOTEVblsYi4vhJZUYPdoQbiojz812VwjsZfzKZtU5j0KnR3YUSLZdg1NP5M+U+WlEoFocaSLNlPRU00kdNZzlg39n4sUUePEcPIP6wHndKoDX1qclyuygc95gIA6PQFHh8ay229X0WoWC0s6V4wHzsLy9MJkU6MmtAs7lhK3ergZ3Y+u+hr1CBtqAUfW1aFqu5tyegAyCaj7VcD27IBg4l3dwACeWfMJ6qSmdBmNdoMqlQIR4sjditOs5k81pCzU9V9HsWUJpyv3J+SRi6Sq1m875TBiOFsay8b+s1xr j2fQfybz kGZfX+0SfogS7s7JCioOGHZu0MtGhisFCPpl5hQK+XvXVtkPnLez0trHI75ug+hWKHnLcYu6BL+II8aoRxJcqYdNcDcn74Zz6Hal+l4k87XeWoLr5TZv753PkHOhTilweJTTMfoq2Bq5fssQnEK9D6Cnv7wbrNSlna3PeMa5a7tvgL5agnckwFUl8pqr/RNQbLzMBHb7ed5ZbNUNXpZvnoDLoESYKpyLRer9t3sDlHCMHWp8Lyp6HvvgZR75yBvc15yp+FYC9tudF6PjbNZWrLv3mrQX9cQlFfPUPorv6yKnYFvGWj8eGrx6Mx4oKUFy9ZVIBDP3An2BCdPmvZd68vaz2vcxLsRwMFtWuUY/m+sX3kH1Dt9mjFXD7STjyh5nZmln6K+TAPUhixwQkBBTaRckffVGFaZF77a4nD43Ndvv/mUi1Je25FM+9SpZu5AXnokyY X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index 133ed15f3dbcc07dc353c22d8522e11a08ee6f46..6bb2562e071c4e623e51852860c682e047f823df 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -59,7 +59,7 @@ static int bcm2835_audio_send_msg_locked(struct bcm2835_audio_instance *instance if (wait) { if (!wait_for_completion_timeout(&instance->msg_avail_comp, - msecs_to_jiffies(10 * 1000))) { + secs_to_jiffies(10))) { dev_err(instance->dev, "vchi message timeout, msg=%d\n", m->type); return -ETIMEDOUT; From patchwork Fri Nov 15 21:22:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876918 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 A51AED68BD7 for ; Fri, 15 Nov 2024 21:23:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 18A716B00A6; Fri, 15 Nov 2024 16:22:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0C4C86B00A7; Fri, 15 Nov 2024 16:22:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE16A6B00A8; Fri, 15 Nov 2024 16:22:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id B43E96B00A6 for ; Fri, 15 Nov 2024 16:22:55 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 705051A042F for ; Fri, 15 Nov 2024 21:22:55 +0000 (UTC) X-FDA: 82789601958.13.D52EBD1 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf11.hostedemail.com (Postfix) with ESMTP id E460840006 for ; Fri, 15 Nov 2024 21:21:56 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=LFvj1omr; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf11.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=1731705594; a=rsa-sha256; cv=none; b=KNtdLAqJxD/gPb6L3RkJUh+LcmKXdVlGqCnF5y54SmjIvP3Nm3TJNHU6WIiNu5IlJFjxTk PNvORshl1aSmZO/kjt6M/iEJGlRZMW7w5kolVZsVbwiRKSdK28C//kmLePQ6jUIU+JHAMm Au7N/N1cAYl+7DEb30cTPx3b5H7T+LU= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=LFvj1omr; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf11.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=1731705594; 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=7RgevXzVOF2wd0QHaqg8sKSXBh3tNnxEZNLAJYHO4/0=; b=MjrGel7j3yXRE9f4n23HJhAIIoETPt+bLF92npLs4qWSKV7m6HNhdONd8IvHq5MCZPnaht +GGuyLqu9wcZyHLplCUN+hSbBoBepNsVMm7h7uatFj5EVH6zbuu/iOJRFYdBP1qiwfpseE MqRLbddr2IQknl7IYD3URbzQMNtzQaA= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id C5D5B20BEBF7; Fri, 15 Nov 2024 13:22:45 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C5D5B20BEBF7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705765; bh=7RgevXzVOF2wd0QHaqg8sKSXBh3tNnxEZNLAJYHO4/0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=LFvj1omrNM0zZtGffox7sgW5nc9dJZdVTA81Dj/wcPv/4s/wuIVOvUvfZbveDvw4y FuotwM7kePQ1S+NtqBMYs5hCFuKfxjTKCfLm2hLOBes2vr8zw1wp6TV7hkDlej16jx Fb+baeYINJlZ9BwwcItDzf5jhfC0bccWbyd+vUuI= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:48 +0000 Subject: [PATCH 18/22] ceph: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-18-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Stat-Signature: 13jdb91ggt4z4z8eyeprm47t4qwjs9sm X-Rspamd-Queue-Id: E460840006 X-Rspamd-Server: rspam08 X-Rspam-User: X-HE-Tag: 1731705716-217978 X-HE-Meta: U2FsdGVkX18qDNDCC1Ur8zxvF3OZ/e3gppgXRPKIQTpO6T+EeyyiUqBXFT7RmOVbFG0dLOpqlX4V7cOeFbPT6p+fIkw3Y+vRgqcQo+lrcWqoOurPzUu3TU5YtKjgv6HPL8PcWRqh6WrU9WEbz2EpE8ESlaPCQ5GiMeZio9AfAxZZX/po13qVImggez+k1VeCpuoXawc8i8EzH46cpbOiSS5+2fb2cKJ3S9C5ircim1OAICysg2x0hfXBazPNwzqFhl39/J6MgjwZVimqX50TRH3LyBn8NDDa/EV0mEXpqiNtpKwIUjrWEca/iVv6m2bFx0C6IEb+n2IbY3btyLNhct/jXF5Od+225QMh2sfaijuLArJ32bmTVWwc4ZY19Qb2XQnc+LbzEJvRL2FJ/qDnbJJUZLNBOzz6mtLS65DDo6kUebgKKx7itmVjsB98Tkj7UN6qwzxzMz8OtqTeXk/8mot0v1ym6sje1znuY99AQyhzv8V607mYkSOfJ2I51rC1fjGyr3OI7/f/+nbeWBLjonn+f/b/ipb9N2NoD//PF52Puyns02Hg/n3mCKXmDGkNf6gvBAQaRwyxkDfYzhPiO9h0pOR1ymOIpoj7db36X3x293XsVZ9Odl6juxLjKFkZuHqYEDr72KDkHVz3CcmVkGR8M2hM2mJsSiOdDPFOBfe2vOZwPpC5JwkdZkgf25WM/ZfKpFMJ2gbS9KpthT0g9NvFVwPlPdWzzRfLQwCbApfd3+KZUyARjdDEXH4xIIziae3FqyFvrKXGCH9uSdV1ZoAUGHh76AqXacynYXIKUHf252eVPx6Bt1SKEOGEJlnKLEem7fmSTAZKERtgFDmZtiUYiGCtxHNUR0SYVi1a5VfjNe45viyhsvbpnSjk3Jn9szHSaa9EXSpRMovYUYFDT29N7Bn51uDB9IyAnjE3FfR/fSIKsw1Jy+PzlPEj+CkriadlkMgvd9O46hTncMz CYDdKlUs PGPvw7M6gMO0AjyS56nA//AJBooqm6cKTLikt0y96XLE9aZjToDxVmP2iLLSO5/aA7NgRs6yZL5ubBu4NV3Xxm/RJlDy3aqRmOniEmk0mzU3zMJpDbKMTX3sf1Uz4CHa4puys9gs9hwZ0lKXoe/sBOphn7lEiRnFUs/un1tEUamSYtegA/vTcAxCYVAMZWPRgUgHasd7GqvER2EpwamD96/+PY1ELPTgAuJseypd8WKa5GsTtoaYkffdE9t5qlJ5ez9JFc8wJWY+cZdmU6jq+LTUN7rCTFbWNH+HTNAx/unKDqa7Si/8usUKWk+vfLKS1F3XI015woIphY3Jf6WC8z+ZxYazwL2augDaQ4BYi7KIlWeAhWdLncS4bD9VW7DK58Ge5wPZVNB8l4Qn03gYSxEEqX4rIrcfM2hv2kdCbVTbHuZFcxBYsbe+tfA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- fs/ceph/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/quota.c b/fs/ceph/quota.c index 06ee397e0c3a6172592e62dba95cd267cfff0db1..d90eda19bcc4618f98bfed833c10a6071cf2e2ac 100644 --- a/fs/ceph/quota.c +++ b/fs/ceph/quota.c @@ -166,7 +166,7 @@ static struct inode *lookup_quotarealm_inode(struct ceph_mds_client *mdsc, if (IS_ERR(in)) { doutc(cl, "Can't lookup inode %llx (err: %ld)\n", realm->ino, PTR_ERR(in)); - qri->timeout = jiffies + msecs_to_jiffies(60 * 1000); /* XXX */ + qri->timeout = jiffies + secs_to_jiffies(60); /* XXX */ } else { qri->timeout = 0; qri->inode = in; From patchwork Fri Nov 15 21:22:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876919 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 760D0D68BD8 for ; Fri, 15 Nov 2024 21:23:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DBBA36B00A7; Fri, 15 Nov 2024 16:22:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D6DFD6B00A8; Fri, 15 Nov 2024 16:22:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9E7C36B00AA; Fri, 15 Nov 2024 16:22:56 -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 7850B6B00A7 for ; Fri, 15 Nov 2024 16:22:56 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 352DCAC5AC for ; Fri, 15 Nov 2024 21:22:56 +0000 (UTC) X-FDA: 82789601790.09.0B4DFD1 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf29.hostedemail.com (Postfix) with ESMTP id 85430120023 for ; Fri, 15 Nov 2024 21:21:52 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=hyUr4x0S; dmarc=pass (policy=none) header.from=linux.microsoft.com; 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731705685; 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=DChbJW+DaqGHGWE0sMF41tmxT4FReQ1FKA/KDyHL32Y=; b=1b1z6PI5UAy4J23m0WJu61juY9yTu44/jok+8gOpIp5BU9DVA+GpNe6l4Mlh2X5ex+yZgJ veJ5Vw0wrCIgwFpYao/Nf2atWIbzv9ptmWhB2dPaeK5sFGw3cdcytZZJDdQG3JzbnveBSG e/j93OiS6Snca2p+xGmmcOYXHyuGP5M= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=hyUr4x0S; dmarc=pass (policy=none) header.from=linux.microsoft.com; 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705685; a=rsa-sha256; cv=none; b=rMzTBkgMidiXk5Mcp1wjflE/NkDoiEJiqgKctgqFn4hw30XrZj1otdk6dly6aOqEf8poGG bloZKytEb12wZ1d1J+Hvx0ZjEQmR7zOwWvVjXQ37tfeSJlWYtHYkAY6adQT3rB/KONpcWS D1FQNRikBa/FYS35v2MdJ3JXu1uUlOE= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 06C52206BCEC; Fri, 15 Nov 2024 13:22:46 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 06C52206BCEC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705766; bh=DChbJW+DaqGHGWE0sMF41tmxT4FReQ1FKA/KDyHL32Y=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hyUr4x0SmruhyF9c/vR8v3QoqKPaKNqXRHaN80CQA/ABgyerOHG1uC/FlE1BJG1ZJ CRMPkjTTeOQg/xepSHO+SvOjz7TT6Fsw5oiwX3exTqn3S8Lu3Gz0gW082RgBKg6fy9 2WD2Rqjpa40SDuhEDGd3pTV1EDPYLPZRKnHzJ7/U= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:49 +0000 Subject: [PATCH 19/22] livepatch: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-19-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 85430120023 X-Stat-Signature: e61ozcq9y7czphg5kqs3sk93uhtdzecb X-HE-Tag: 1731705712-92296 X-HE-Meta: U2FsdGVkX1+OMPdNxp0MDEroXK/u6n9DBvh/HkNqOfW3kxf+lcHlJMI3OZMibV3VoEAhnA3gVcw7ORqaULwmB95sI2Wjpbf7RwHJNhO78p0PEDtpT92P5VJDi9E3HkgrYcN6a5ZFsFpZWZwJWFH/j/HwVpBkNzV57VHcaOGWTgNcTCsvlssFedSoX+rpho+bmQS/Vz8/I8wiiXE2tCh+QxYHJL1BW69sGxlcoKNRNfdV2Xi/o82a6673R2xtlCj0fyUl3yHDy9nkrhZpm4y8RUho31SKGFyN/fJ7fLtnheSgHAgN3LBkwrtLYuZwZTJEOY4R8pZlKuOZN8yxedMDBJylv6ZJ9rIAnvNAde1Q2bNCL7WAqddNJ6vnlWnONuRjOhfFokXcICCHxyXyir23E3iVOwvOB0Q2p38TAucKplk4CXX2yqhTMcLkO1iQAw32c8CMHfMfE+x9ncP1CCphljskbTpibB7rZ2eB4yssOcJ6mOt3IxsvKrow6Phah3SWcOtpu3eMS4LiaYwsI3k1OtWgZcs7SYfgF40t9SrUY5uMxf/PkXStJg79vcgI8thbzwXw8kDDC62x7nDQPwN9MeJC5QlHEd5xhrZdNjIH/9xLW3jrFvxqZLTHhp+9mGoTB80st07Q/d1z4FO3k4TbP+V/1XN+5SP4c+YZDc69cEscDK1YmWZE/BRyystattqslCcGweDdzUODcf0YMYCyHwro6XbTSpRr1YYyQHowGEfAXl/s/Nator59/hlsMML+eTnQ+KjYP8n6/9DOO75LqM/o4NmsLA240Wky9qECeX157loXfnqclfPdR0z6GQIhif0GcgF20IucqpR/e2o5w0x8iYK1uaFuuiabFDd+BHHIBslljrfdNCu8wphTYch5Khzl3Wz0s9uZ+MjChpeZEmXff8+47dEj827XqhlUcUdb3rJakzKx2jB3FXGCXtvSfpMH/VqLLnDvRLrTfzB 8EZgWwvM VSG29k0eOy/xkRFHa9U0N5mlsmHeUQ1/ohyb2BYwwVfDHS8l1MD8Jo366P+58XdHGhpXvyQp1WpySA5QjD1GQzFpL/IRZOH3GesZX2cln87lSQ5CdatABtFkW/eMO/oskI1HDlSTxDhLottGvp89BO9PTtE4aX/5ECfP9aWnL+j1lyCJtuDTZ0co6Y9ia2JxHAVoZXEjla9AJXy3fw/qV9qOsnSH+4UTQMUo78zIStHLHh2LwHsAKdSVtRWZ6MIW7CJ78NYUxWvFL1Y2PgqQ+KKdJR+FLTM4wbABDeFA0Ih4X/dYftKxfLuuUAOG5mnebuLEvglAX5NQ6E2AtMHgRRLZZwfM6dgNW9j97xMmxOFd/fG93ydodwbRaZzZ0U0Ex1ditCPKXr7wXbyyNHy4pZvFd4c+Otnncp5okMtgWp80jH5dru8LD/EQD62T7gdS6scTi X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- samples/livepatch/livepatch-callbacks-busymod.c | 2 +- samples/livepatch/livepatch-shadow-fix1.c | 2 +- samples/livepatch/livepatch-shadow-mod.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/livepatch/livepatch-callbacks-busymod.c b/samples/livepatch/livepatch-callbacks-busymod.c index 378e2d40271a9717d09eff51d3d3612c679736fc..d0fd801a7c21b7d7939c29d83f9d993badcc9aba 100644 --- a/samples/livepatch/livepatch-callbacks-busymod.c +++ b/samples/livepatch/livepatch-callbacks-busymod.c @@ -45,7 +45,7 @@ static int livepatch_callbacks_mod_init(void) { pr_info("%s\n", __func__); schedule_delayed_work(&work, - msecs_to_jiffies(1000 * 0)); + secs_to_jiffies(0)); return 0; } diff --git a/samples/livepatch/livepatch-shadow-fix1.c b/samples/livepatch/livepatch-shadow-fix1.c index 6701641bf12d454a770e49abeeb0dea92560e55e..948ea1f5760fed2fa27baf478c97cf98ad5c99a8 100644 --- a/samples/livepatch/livepatch-shadow-fix1.c +++ b/samples/livepatch/livepatch-shadow-fix1.c @@ -73,7 +73,7 @@ static struct dummy *livepatch_fix1_dummy_alloc(void) return NULL; d->jiffies_expire = jiffies + - msecs_to_jiffies(1000 * EXPIRE_PERIOD); + secs_to_jiffies(EXPIRE_PERIOD); /* * Patch: save the extra memory location into a SV_LEAK shadow diff --git a/samples/livepatch/livepatch-shadow-mod.c b/samples/livepatch/livepatch-shadow-mod.c index 7e753b0d2fa611524c9e2adbe02c8fa3e9b6015e..79296e6ccb119f521e86a121623855d841c9fc5e 100644 --- a/samples/livepatch/livepatch-shadow-mod.c +++ b/samples/livepatch/livepatch-shadow-mod.c @@ -102,7 +102,7 @@ static __used noinline struct dummy *dummy_alloc(void) return NULL; d->jiffies_expire = jiffies + - msecs_to_jiffies(1000 * EXPIRE_PERIOD); + secs_to_jiffies(EXPIRE_PERIOD); /* Oops, forgot to save leak! */ leak = kzalloc(sizeof(*leak), GFP_KERNEL); @@ -153,7 +153,7 @@ static void alloc_work_func(struct work_struct *work) mutex_unlock(&dummy_list_mutex); schedule_delayed_work(&alloc_dwork, - msecs_to_jiffies(1000 * ALLOC_PERIOD)); + secs_to_jiffies(ALLOC_PERIOD)); } /* @@ -185,15 +185,15 @@ static void cleanup_work_func(struct work_struct *work) mutex_unlock(&dummy_list_mutex); schedule_delayed_work(&cleanup_dwork, - msecs_to_jiffies(1000 * CLEANUP_PERIOD)); + secs_to_jiffies(CLEANUP_PERIOD)); } static int livepatch_shadow_mod_init(void) { schedule_delayed_work(&alloc_dwork, - msecs_to_jiffies(1000 * ALLOC_PERIOD)); + secs_to_jiffies(ALLOC_PERIOD)); schedule_delayed_work(&cleanup_dwork, - msecs_to_jiffies(1000 * CLEANUP_PERIOD)); + secs_to_jiffies(CLEANUP_PERIOD)); return 0; } From patchwork Fri Nov 15 21:22:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876920 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 50DA3D68BD8 for ; Fri, 15 Nov 2024 21:23:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B219A6B00A8; Fri, 15 Nov 2024 16:22:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AAA696B00AA; Fri, 15 Nov 2024 16:22:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D74E6B00AB; Fri, 15 Nov 2024 16:22:57 -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 6171C6B00A8 for ; Fri, 15 Nov 2024 16:22:57 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 168728038E for ; Fri, 15 Nov 2024 21:22:57 +0000 (UTC) X-FDA: 82789603428.18.2864D1B Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf20.hostedemail.com (Postfix) with ESMTP id 2CE581C000C for ; Fri, 15 Nov 2024 21:21:58 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=SFgsUzV2; spf=pass (imf20.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=1731705718; 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=94UWkQUgIE+TIBJCr3TB9bjXju243wFFlCrw1pjugTo=; b=kNvKwc1+k0pB3zDsk1RX7yDe5ySx87cnJd5xovmAEKOF2mZ2x8V9Oy8U0EJOs+7Ed7dBBl ox2IctDOnx7WE4jLbJFvRqYQ508/A6LSXf1yXCD74f6mPQKerE2bzbxXD6Dks3CUwIpx12 fhSP16tYRTXNt9B62q8i8UZ46f0f7LU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705718; a=rsa-sha256; cv=none; b=eldujJnP3013J6V+3AgYxMXVM0KwQNBbl4/iwTzw1DKBDVLj8KCaLjxuf1gmFdy+6GurlM aP8IF/qgGqey4P+EB5wmXrglPmiTBuRP73smNlPo0ZX93nlbm0d+IJhrcw62G7EwHXiNTE BX7jfDJ9xESSAjeEPj9tP9wjy/q8Eu8= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=SFgsUzV2; spf=pass (imf20.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 391A4206BCED; Fri, 15 Nov 2024 13:22:46 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 391A4206BCED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705766; bh=94UWkQUgIE+TIBJCr3TB9bjXju243wFFlCrw1pjugTo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=SFgsUzV2pr+7sgkN9ckclI41KlvZ5rbgTJNvcYfQiJkXt/zfibxMELK/nTIaeiHDO ea+s5uVXRp6XFAaIO7MmvRCgTW3Xe5hl6IpUNHPKOVjiYfv0tTkJJCNkRHRjEL8vOu pgAUpMsv2jfhmvY7krwkZWjWRsRmTp18YKKkcVMM= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:50 +0000 Subject: [PATCH 20/22] ALSA: line6: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-20-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Stat-Signature: 83ate4mcqhdy73bxcogrp8dynqn58ujm X-Rspam-User: X-Rspamd-Queue-Id: 2CE581C000C X-Rspamd-Server: rspam02 X-HE-Tag: 1731705718-297684 X-HE-Meta: U2FsdGVkX1+3Um7WIOOrSkTYbJKMVz8XAxXPjcqTnN5rjsMQKMadg+aLn9XYYSyd5bx0xoZ2ErQsefhgitJc/3ClJfIsK/K1fqW6eClRQsIVnPNVIZr5x9wOhuXWERhtjZwFMf13fM+WEMieG3LprT5Ql1W96VRsghtUdhOUAd0BfjQNNomRqA0J0M9yrS3vBSpvbdZ6SvikC8dGDFNfDVvczxAsi1U32/ty1Bkg81HDy0FnhLZLSrHziy+xUOx1d2Nk/fMPWKSR2jKzi5+XTm9OvvKGyZwsSEK0SgF80A8SqU58YFvfw2ud6Nh6lJMYo28Wofm9PkvLFtIaKQy8IGFlXWbqZvdjVO0FmZTN6MgwCrlZYnRKgWgGnWBc0Tb5g/EOXQgp58fzBMCyHc7+GHp5rznTwGQj/vToy0FsxhczuE8+EXERtjN30rc4LKtRWRJBNJbvbnYcxwr8ev3FBPctyeGUZZvuP3DllPkD92dCMyj94vXP+k/qMUP7Kz04oOn7CWiypq04QRNzzc56Rk3jK+2ayO0xb9ipjJbWUZ3qrsfg0ymtmq5AYomgtOtOjBxu5zs5dmQHqFJHMQIHuQp7FLpmuTiHsrrnKvJutb3+Yeq5fK0NTx2UZVCX+2thPYygJg1rAwsJgKJHVOCD9YRm+5VncfPm+pjqCGcwvX/Nf309gFg+N89UHBJWgqLCMzIQU7RwKnCQrPFGFV4Ak2sDmmHOP6bVh5ABOWmIHzdQFWdjpkntJ2iltVLuyfmGbzddsDCrrx7SPcHikhrWYWXSHKJjnZsFqFUnK4UuS8qTWqFHOXac5TVlFbpqIwaOgeEMTY/Efy97bu28vQDi92vTogY3w9yUoT9W56bx5EvsVT1OnOXyC6Abs6O9BvCrRAgW0ydRIgsCIdqyMLHG42wIZ8g6DsEbVpm14Yyu5pBv7Qxb/VZjYR9yPIgqvI66zVmTw/Txz/WcX9G1qs5 iaaBuCop CyEtemf6iEeSoZ1aF1lexzjlUF/UwVHt2zco5HDR8Cv/IhfVw52tAD2hZMd6ODHFfq81KEBnFgEP0fKeAIf3xjrLQzMzeyxMJYNP/mXXpsBdv5KbGXUQhKIVaDQcf78ok5Oq5TGt5i9wSezGim4pwz60orSstAB4NM/iNvT1r1ADlX25CquzsuhIUGMil0SjPpZBLkDxb4JtlY7GKS9nsRNJpDFM4UdVeqrchayIsYCpqHz1P7yILVo8+ubN8Tr+ZGB4Xzjo39j4WxqrOoTBUgzzppb8ECGKuiXvwRFq4XfG4m8D3KpTCTAGWYcaf6QZcshCs9RQvnwoZbqxqLKzhQfcpgkTJb1SDd1vCwX0YdWDt8gvXJ/yFGxD+wmLpT+1Ba+EcV1NW62yKXHhBNNQrZ5IJ3hzo35/s+68SpDzGP1SU/3Zk/EUXaS6aaUe3gAWrLMsb X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- sound/usb/line6/toneport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/usb/line6/toneport.c b/sound/usb/line6/toneport.c index ca2c6f5de407ece21ab69a39ed603e3f10069039..c073b38cd6738176fc6a276d05ed553526573341 100644 --- a/sound/usb/line6/toneport.c +++ b/sound/usb/line6/toneport.c @@ -386,7 +386,7 @@ static int toneport_setup(struct usb_line6_toneport *toneport) toneport_update_led(toneport); schedule_delayed_work(&toneport->line6.startup_work, - msecs_to_jiffies(TONEPORT_PCM_DELAY * 1000)); + secs_to_jiffies(TONEPORT_PCM_DELAY)); return 0; } From patchwork Fri Nov 15 21:22:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876921 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 0734ED68BD8 for ; Fri, 15 Nov 2024 21:23:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 271066B00AA; Fri, 15 Nov 2024 16:22:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F9CC6B00AB; Fri, 15 Nov 2024 16:22:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3D7C6B00AC; Fri, 15 Nov 2024 16:22:57 -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 D48776B00AA for ; Fri, 15 Nov 2024 16:22:57 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 8163F1C6198 for ; Fri, 15 Nov 2024 21:22:57 +0000 (UTC) X-FDA: 82789603428.18.2CFE825 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf05.hostedemail.com (Postfix) with ESMTP id 1901D100015 for ; Fri, 15 Nov 2024 21:21:28 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=PgOujrsx; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf05.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=1731705644; a=rsa-sha256; cv=none; b=W/Ui3ymRW6UKriSaam7suJRKk9RkkVXVLTpavCSvlodtXCa1mXTCSqVDnjCb0KmpyzHn5L LuUHy3ITH4OtkYOp3i8GVYdO6bJZ2WMOP0vFTponvK/t9pJUBq7W3BiwdGb8PKt0kpReq4 f6lExGz5XyU6VhHjz1XmiQ+Rhm6jS88= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=PgOujrsx; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf05.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=1731705644; 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=C//qZdfJfhN40N7nu/AQ5wmq+hj+onzvFzX2KrlsiOc=; b=0rXlJABN6FVPQ0l2XY9wuKDISAxRbkudZhDy6AE2v6wZmyDV0/WHolTNKC25RFVhHgbTZ7 F+xM9voHG1ey6+JDrrl3s7Ik1G0RbKHWMYwG0Su3+eZtY8C+Jz67GSltXIXPB+n3ZPB7UZ GVo8Nl5FNKhcQ2u69I/8IvkHAWKbK+M= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 6D0F7206BCEF; Fri, 15 Nov 2024 13:22:46 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6D0F7206BCEF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705766; bh=C//qZdfJfhN40N7nu/AQ5wmq+hj+onzvFzX2KrlsiOc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PgOujrsxbS3CIW2HtLS/dd5ya7VtRG8QHhCZQdBAsTM3cx+kDkUAOUPnWwMnerztw 8X+Y81upKcxyh16cr7IomUwsyHP2XT7qOxm2nnfHsDBJOEcmEz0gtoHQc1mKP3Fi67 1u154eT7RN/hsmnSsi2wJWAYt//zpJk5MiSg9/YM= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:51 +0000 Subject: [PATCH 21/22] nfp: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-21-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Queue-Id: 1901D100015 X-Stat-Signature: ocwfsrdzt8fx8ryghgdmb49py9caktec X-Rspam-User: X-Rspamd-Server: rspam05 X-HE-Tag: 1731705688-40468 X-HE-Meta: U2FsdGVkX19skkg475UvedNjA2JgR+Kb9uy1aTdT8GeSuv5AuGuzMHYNmuhh40veU0bX8sDYRSSzooTrDZEFgBvCX4+foGZogVvvxFc6TgS1ARHof9fxSVnZ0zyMemS3BRGjy+cSOq7z80cB9NLvOemG2KNFAnjH4k/4sdrEgF7ui3/GCXRG/7skdfi5vsM8qCEXek+YbOA3WqiXiPciZ0GYihfr4pAqWMTRmZcdHf9GbP0dh8MhTaGOqPNsxTxYXgdqcZl50G3a2iGZLhxU2EsXpyw80KH1E4SrG/+U2nM4h9zydJRi80lFq9ymyUxq8ouB4SD5GimKN2a5Ocu02rvx6nYBXyXDdsficYXnl+eAdkvhztnbKOVEzncKX/PI2i0pvOtb6R0U4tttvfTT/kMhu8nAo4mH8t7X2rDd6wCJwuw7jfQ+9WZYwe+2Vu0QYTwfMqCUSAvBQymARZxETMTQYMcm/moupzb2TdZCiMbU2Sl3ItrggGX50LWkqm0vZon8QBNdgNhQ+w05KT34xVHkFs/VIKZ2c4yQIVa4b8hO45ExZgxwMk7IuntAiMdZg0FeYDd7NQc9R84vukOx9eC7+5gibtzYTbRgTAWoL8DnoMq0BvAYJ9b9HpWBWibdCOKj+E2O+hSLj1kFYIBYG8iIjfz1CMXveQdqT5LVexFfDWORJDVFKtHTpwU0L5Yp3gvkkrtOAZSuZ9u9c6vXbLEEO7ttZu8kidoJA0hXdR29HSh7jK96GzWCcNx9y+myyVhzcsmdfH2PneyoHn58dY8S0T+ZC2NyrMYFRs7yRIdPVFoiLtsQbDNvexfD+tqPNhLf9NDmoOBB5DUw3KKwazOG8hyIsNHcd7+SENnyBJQ8y9cEpWgoSq671RcFAyRyyt846QuXUK8wk1ciy87kEOAZgmLFqm+kYdgkVSNpY4XkZkd6DLTsWmwrpH6eLAOqbCOv/Om31fGiKYwU4JD Yl1uRB8n Fb8KCkloSqehD1l11RMvT7gmOoXAT3/CNc6K/SaR/3/iDNp9YksJjNkfg70AkHC2lwik8SrpZksMWALnXDca1Ki+bNZ9Na+zfh4HO+74ONJDeD01kYf2qWKrw7IV2qn6GgKyC4xDLiw3+ACvHiipKSe1g391mTWh5oTcpU+uPz0nkLE/NPuwbD4G62Wyk1dFCb9C1O4NnP5MGIfnAU5ch0PxiJdNKjL9x82a7u9vH/668gSigUhaqZW5N9DE5P1x5XmUfldk3Xtti5RwWaEgeNi/M34nFZ3F6FU0OGHwYv8U5h7Wq6QiT1f5kmqidr4PQg2KfOLLaksW3mfTp9NO9YVk9Q7I8SzymutTOfnQS8KLNNXKhRtIN0uNYCzsDcJ7j7BCOZ0yRlHXDDJm4W2suQjz/w8az4TwvgNSAk57NjWmmQbvZCK0WhLW6aTkdbkMcaydp X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Changes made with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Signed-off-by: Easwar Hariharan --- drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c index 6e0929af0f725b2b3855c69bbe894e6626c566b3..6925ad985fc9e2d5641feea41ff277107a8dee9c 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c @@ -2779,7 +2779,7 @@ static void nfp_net_netdev_init(struct nfp_net *nn) break; } - netdev->watchdog_timeo = msecs_to_jiffies(5 * 1000); + netdev->watchdog_timeo = secs_to_jiffies(5); /* MTU range: 68 - hw-specific max */ netdev->min_mtu = ETH_MIN_MTU; From patchwork Fri Nov 15 21:22:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13876922 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 4CB92D68BD7 for ; Fri, 15 Nov 2024 21:23:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A3A976B00AB; Fri, 15 Nov 2024 16:22:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8AF006B00AC; Fri, 15 Nov 2024 16:22:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 68DDD6B00AE; Fri, 15 Nov 2024 16:22:58 -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 449436B00AC for ; Fri, 15 Nov 2024 16:22:58 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id EB3AC120422 for ; Fri, 15 Nov 2024 21:22:57 +0000 (UTC) X-FDA: 82789602630.06.BC11F44 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf11.hostedemail.com (Postfix) with ESMTP id 5F66B40007 for ; Fri, 15 Nov 2024 21:21:59 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=iplUk1Nd; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf11.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=1731705596; a=rsa-sha256; cv=none; b=tqjSZrC3ITZUQUVLUC8WOhbcr4JR7Twu42N+pXfwswIXhCBDIybUJUkp1NyhGAqnpqV0JL gZ3XzXWjXgYgbFpp0fM8ZWf+ZprZSsFieDpcWXi64Eg25Vy6EQvLyqeGKQ8dkAdPm1Naxg iooxA4R8FXfEykAS6R8E2DmPXc0b4Mc= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=iplUk1Nd; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf11.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=1731705596; 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=8an4FgjBOt1s+5Gzupd7mugSuJBcUUHR7ha3x9HR0Ag=; b=hBxUtQ+MhocM0OGR1r1qoGHwc2V887K+yOazX56v+IWTW7cC0v9xoapwvWyN7yPipXdQoe 46wvfol0j8Xo1zmLqP6HnEhll0neELFOHtaVQ23yaI3fcXY4R6Iwo2KJfFIpDOzvW5wILA 0zIXHEXYGsnyFJnYWx/14A8bPKgj2Ik= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id A22AA206BCEE; Fri, 15 Nov 2024 13:22:46 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A22AA206BCEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731705766; bh=8an4FgjBOt1s+5Gzupd7mugSuJBcUUHR7ha3x9HR0Ag=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=iplUk1Nduoh9asilHgzn6HQycVN1VFv/mFBOdW0Mpd4aq8sOOirOgItcWBMTidM3Q FvxfPpyBxEWdptBjBV3AGgplTOjNGMgWDICXRk9fFUvguk5wrwqFw5sjChgX9PZPt7 /h1a1SkEI1LPNYXASotI6c+cUqHfSyHVemxnfBAU= From: Easwar Hariharan Date: Fri, 15 Nov 2024 21:22:52 +0000 Subject: [PATCH 22/22] jiffies: Define secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241115-converge-secs-to-jiffies-v1-22-19aadc34941b@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v1-0-19aadc34941b@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, etnaviv@lists.freedesktop.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan , Michael Kelley , Thomas Gleixner , Luiz Augusto von Dentz X-Mailer: b4 0.14.2 X-Stat-Signature: tz9777exhwpcbyzbxfgd1q4mtx358pa1 X-Rspamd-Queue-Id: 5F66B40007 X-Rspamd-Server: rspam08 X-Rspam-User: X-HE-Tag: 1731705719-50082 X-HE-Meta: U2FsdGVkX1/M3q4+CilB+XqnpcZegjXTkJ2sIQ0Ch6RyTkyjnpMz5xWt/p9XqcdXTxH3xZEIZajwMnuMbwlUxq7E1k1EhYy+qpljSB9UYHqvxqkHGgxjFmHedIt3Y780Zej2IhmVLt+RbTur4G4Hdk/UDXxKAfEdU2TL525PtwFTdacAcVlRKZEr3wpY9zAlYW8sJd/y6nH/UCofgR8Z0Ao9ireCPnztG/ULvz1GwYKdbP/myRyyXzrF6ExJeOP/749x6svfnnGvbT0VHEUiUtUMy5qPeOvYPhlbkrRmIN39mv0X1R2OZiH/ZM28FWLRytNeH5fRyR/g+y9MMLl4ohfM6EWeUHqOXVeOCF138aCOvEFGDQDhFCY7ff8kXxBbAPxl3EGN3usRipKZMai0wPf2jxYwJKEPMkZ62L2hfqRpJ8NEE+fr6l9eLKPJZ7iKc7y6wyDCi+zk+vi4d7tWZE40wbpFUxQFrPqJdyir5tIvdcID0etSi28pARI/+9ifR0NXYefCCOW2A7ywhpVwaAvxXzQilYAl2f7HlsapHSDlZDsDKnELYewBx6UUc7suml2NRKy7BODKagED9Qpyy34eOwPkJOd4aB3rqTWV1NJBL6Lc0XIDisrZyi6po90KGTbWXiKysUvDS/+c1d+y8mOx3BIgtsQTQt85aXt/lVBWzlvTJPIZBh3kn/sicxydHCNeuSy0QKAgKhNQiknOOYC4x08+zIqfqPxAcXhcz5h+5/52tORdTVdZJpT2C4ULPrGLah+jQnrDjTTQYgh2qJ5TjhL/JEwCerbVhQT2Lef3B/ZEjUvrFBf7yd0wZaJ+jJms0uWdsPtZE8m3v0RFHsvnIgSMi9isMAb0XTVn9LhhbOM/asTaTUXgcZ0nUDFZczIxmsgp6sDMAOjJxaZN8bHy7aOLSNTmB1087g1ju7H1uFPlG7CuxOs8Dw71gb5wpL4XPFvGvxJ1RSwovCi PurRC6nA CpQyuyGfbNbQaVEMuQnrrkcNABGvB/rGShqe+GbPCgVG8XANyy97xAXvy4emNOYotSVMtRG//lJABuZ4Pz+2l+wO9H5t4HyTL67MMR3jNldPhoJb6VW7mudH/gg5GosijxgFVjv3ON07hCwFItSQSNzN9XZeGv369CLCHWzfQluIF1MhEhKCiwffxYExyEvxIyDbsCsU/Kg301OnDq0cLgJ67NwagEZcaVnC5/JR7OsT5PA3YoPMCTbynP8RCBRDZ8DDq5nwUNk9uwiM0GGtbM/wrxKmnuESAk5AHq7WlfPhXzzIONmBVvngjJ4EGi/TchlWB1eoA5/i07Wj46GHr0FvEJKjP4TQyMxR0exPSG3iI+wSLmHyxksoJEe9mT6xaTLC8OHVvanYLh5nId1FregGX5emq4MVQMDeR5GK4TkjebiV4OhEfrSf+7fH1Vbdwem07NkhGSEpC1+JlCiUVj5s3mqT8huKazvaxL7OcG84nyswc038Cm5xfU9VidAu/KCiu 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: secs_to_jiffies() is defined in hci_event.c and cannot be reused by other call sites. Hoist it into the core code to allow conversion of the ~1150 usages of msecs_to_jiffies() that either: - use a multiplier value of 1000 or equivalently MSEC_PER_SEC, or - have timeouts that are denominated in seconds (i.e. end in 000) It's implemented as a macro to allow usage in static initializers. This will also allow conversion of yet more sites that use (sec * HZ) directly, and improve their readability. Suggested-by: Michael Kelley Signed-off-by: Easwar Hariharan Signed-off-by: Thomas Gleixner Reviewed-by: Luiz Augusto von Dentz Link: https://lore.kernel.org/all/20241030-open-coded-timeouts-v3-1-9ba123facf88@linux.microsoft.com --- include/linux/jiffies.h | 13 +++++++++++++ net/bluetooth/hci_event.c | 2 -- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 1220f0fbe5bf9fb6c559b4efd603db3e97db9b65..0a7382753c6b636fe285599953e314fb7479ea01 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h @@ -526,6 +526,19 @@ static __always_inline unsigned long msecs_to_jiffies(const unsigned int m) } } +/** + * secs_to_jiffies: - convert seconds to jiffies + * @_secs: time in seconds + * + * Conversion is done by simple multiplication with HZ + * + * secs_to_jiffies() is defined as a macro rather than a static inline + * function so it can be used in static initializers. + * + * Return: jiffies value + */ +#define secs_to_jiffies(_secs) ((_secs) * HZ) + extern unsigned long __usecs_to_jiffies(const unsigned int u); #if !(USEC_PER_SEC % HZ) static inline unsigned long _usecs_to_jiffies(const unsigned int u) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 0bbad90ddd6f87e87c03859bae48a7901d39b634..7b35c58bbbeb79f2b50a02212771fb283ba5643d 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -42,8 +42,6 @@ #define ZERO_KEY "\x00\x00\x00\x00\x00\x00\x00\x00" \ "\x00\x00\x00\x00\x00\x00\x00\x00" -#define secs_to_jiffies(_secs) msecs_to_jiffies((_secs) * 1000) - /* Handle HCI Event packets */ static void *hci_ev_skb_pull(struct hci_dev *hdev, struct sk_buff *skb,