Message ID | 20241115-converge-secs-to-jiffies-v2-7-911fb7595e79@linux.microsoft.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 BA9AFD68BEA for <linux-mm@archiver.kernel.org>; Fri, 15 Nov 2024 21:26:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AFC228D0001; Fri, 15 Nov 2024 16:26:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A84FB8D0008; Fri, 15 Nov 2024 16:26:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8887B8D0001; Fri, 15 Nov 2024 16:26:47 -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 673E28D0008 for <linux-mm@kvack.org>; Fri, 15 Nov 2024 16:26:47 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2247C8037F for <linux-mm@kvack.org>; Fri, 15 Nov 2024 21:26:47 +0000 (UTC) X-FDA: 82789611954.08.79D03D9 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf15.hostedemail.com (Postfix) with ESMTP id 8631DA0005 for <linux-mm@kvack.org>; Fri, 15 Nov 2024 21:25:58 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=Fqjuy5eS; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf15.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731705825; a=rsa-sha256; cv=none; b=5AEWhDlF9LXnd9h3iNEMzdXThQuIS9jyUNxSdXmNFzZ+EJ6Ml3N8MrfQ+sB8PXnPyI78FE saQAt4bDG6yQGXryV5Ov8RlLDlLeJ9StbVtCc7u9UumsH5H82NVCf+A4/zBUbLU3XRPjD4 MjEN2xUTRZxIzqFy6u9pOfuGf2R3iUA= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=Fqjuy5eS; dmarc=pass (policy=none) header.from=linux.microsoft.com; spf=pass (imf15.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731705825; 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=fikcr2APfj1LiOramoiXkrniloqI2jL/Yz1F1BeQ8WQYNdhxpfChHj331WJf6G8hq1OZqI PpeIFyanhlNH/y9FbHTVfQux/nY6A0vZbo6HmM2sXeQhqkvY21vTNlWb2rQ2LYrzDiJJjQ xylcT0w+JnBIfc7f+iPaJUTR2DMUpMA= Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id 9A64C206BCFC; Fri, 15 Nov 2024 13:26:42 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9A64C206BCFC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731706002; bh=QYs6jKNkSqRMwxas8zTGS0f9EDen03tWxmE1GsbmPvQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Fqjuy5eSiRbnXSL2o0v7YwMA9fZ674Q/Gd+25Z4rP4RwCiu11at2Mv7W7PGMuqY5d K4P8ORik82r/04knqALaANam5+D1reZvHHMZxADzcYp9l2s2TYV6JJ/Elj8BYsGqr3 W1hOklHhhwD9HLzPgJ9aKxBAHgaV0sBNYgQwU9cU= From: Easwar Hariharan <eahariha@linux.microsoft.com> Date: Fri, 15 Nov 2024 21:26:24 +0000 Subject: [PATCH v2 07/21] accel/habanalabs: Convert timeouts to secs_to_jiffies() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241115-converge-secs-to-jiffies-v2-7-911fb7595e79@linux.microsoft.com> References: <20241115-converge-secs-to-jiffies-v2-0-911fb7595e79@linux.microsoft.com> In-Reply-To: <20241115-converge-secs-to-jiffies-v2-0-911fb7595e79@linux.microsoft.com> To: Pablo Neira Ayuso <pablo@netfilter.org>, Jozsef Kadlecsik <kadlec@netfilter.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Julia Lawall <Julia.Lawall@inria.fr>, Nicolas Palix <nicolas.palix@imag.fr>, Daniel Mack <daniel@zonque.org>, Haojian Zhuang <haojian.zhuang@gmail.com>, Robert Jarzmik <robert.jarzmik@free.fr>, Russell King <linux@armlinux.org.uk>, Heiko Carstens <hca@linux.ibm.com>, Vasily Gorbik <gor@linux.ibm.com>, Alexander Gordeev <agordeev@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Sven Schnelle <svens@linux.ibm.com>, Ofir Bitton <obitton@habana.ai>, Oded Gabbay <ogabbay@kernel.org>, Lucas De Marchi <lucas.demarchi@intel.com>, =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= <thomas.hellstrom@linux.intel.com>, Rodrigo Vivi <rodrigo.vivi@intel.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>, Jeroen de Borst <jeroendb@google.com>, Praveen Kaligineedi <pkaligineedi@google.com>, Shailend Chand <shailend@google.com>, Andrew Lunn <andrew+netdev@lunn.ch>, James Smart <james.smart@broadcom.com>, Dick Kennedy <dick.kennedy@broadcom.com>, "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>, "Martin K. Petersen" <martin.petersen@oracle.com>, =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= <roger.pau@citrix.com>, Jens Axboe <axboe@kernel.dk>, Kalle Valo <kvalo@kernel.org>, Jeff Johnson <jjohnson@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Andrew Morton <akpm@linux-foundation.org>, Jack Wang <jinpu.wang@cloud.ionos.com>, Marcel Holtmann <marcel@holtmann.org>, Johan Hedberg <johan.hedberg@gmail.com>, Luiz Augusto von Dentz <luiz.dentz@gmail.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Florian Fainelli <florian.fainelli@broadcom.com>, Ray Jui <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Xiubo Li <xiubli@redhat.com>, Ilya Dryomov <idryomov@gmail.com>, Josh Poimboeuf <jpoimboe@kernel.org>, Jiri Kosina <jikos@kernel.org>, Miroslav Benes <mbenes@suse.cz>, Petr Mladek <pmladek@suse.com>, Joe Lawrence <joe.lawrence@redhat.com>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Lucas Stach <l.stach@pengutronix.de>, Russell King <linux+etnaviv@armlinux.org.uk>, Christian Gmeiner <christian.gmeiner@gmail.com>, Louis Peens <louis.peens@corigine.com>, Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, Naveen N Rao <naveen@kernel.org>, Madhavan Srinivasan <maddy@linux.ibm.com> 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 <anna-maria@linutronix.de>, Easwar Hariharan <eahariha@linux.microsoft.com> X-Mailer: b4 0.14.2 X-Stat-Signature: 5jfb9bwuo6pp4pyka1o5n1h9rk7uxaxq X-Rspamd-Queue-Id: 8631DA0005 X-Rspamd-Server: rspam08 X-Rspam-User: X-HE-Tag: 1731705958-975710 X-HE-Meta: U2FsdGVkX1+Jjb0+sBB+NhmBQTaFoyIaNzbkliPwuTAM4rMLfSB9XSqlxDTDM127BTehfl5CnHN3dJR1y96+HF7OO05jIVX5UMCJWMQHKmvWdczx7SF62d2+npIe6zfT19UjtytJ24R7WKEZkNEl7n4V8AhaTYpfXNoEA/7AKKjMfYAf9x8f0TjQfgHZq85saQZ7UNh5wgLoY/fwGQRXU35tlSjosXnd+O6gMXt0TmTYta1v22AP2JCtGNEMvibf95p5ncjrx19HNkuzQqWCU1qciST4Tx516EkX9wRdO8jfEqMqWVBMy2c6GTymGXf4Ac8TYZs92fJPso8pBSfKl8Ek77ttEBFMtmA7E0KV7zr0tfZFHb555QXQ+BYcMtFTNNchS8MqJxHXE2Nzb5YUzHQJb8hSFfz6qEHzv7TdrxWzKlPoJhlDK9rklp7GUcumReHkT+Ub1xWd+Vj4lqv+o8y45NYfQmcr7BV+2rVqFTrD9SpnewV4BT58mL8fqhXV7W8PNZE6GvlLtBIEtpb6/f+3MBhCICNA9BoSF3i09xgWDZ322r8F6BQnezBfebw/G+iNjShwvkCkVLUh5mrATIRV+EhP58QPuoP69SJuHVIyXH/LDueV5Q9lxgvSJL6QBVC+dKhD+QDcspdFKNpsoq3GR6A8MttIQsrEPQJ0QjVSoH0hvHF4K7jbwvblCd2vRpcAucGovIbVc9kH2uEpjlmgOStNlJh5CwQhlfoq895+3mVAVyWEDWBwsvw+dfrerdKo8u+1xS4c2N0JEHtfXvXzbPcKrdXQ1cSfFImfxnDbI/xnLIYOteLyxlBM0J2kB0rh3nvaClekjpKfWWJDMp9nHgZeHrV1215WHFzkb0xxIIxeKyFkWF77sjutG3zmmRgBS3em+xW65VtW3OHRsfrfcxTxApoh4FeYkz1PV35S8nRulMecqPMNX3brFMuzFazukxo1UnzHZozp8JP D8hcJEi6 Bj+YYCDH3RVCM1KwGQh18RKmHr+xLpY542TNlVqz4b6ITG1VduNng0YIsRnHDgPxnNGT09VyrTJHLzWs17coUqC5zR1uhqh1M8fc/XWC1fbKCo+df1DKz4y/XNkjh3fB0pbTccBbWKpUNmrEn7DMdhV9FvI4fEqTjOnQGP31tncI9rXSegYO7YeDeo5hayJr+tcv2hr4+Chhv95W/mDOtXKw48MAtQdEo6MvitKSHJ222BtSr9tQCMLGiwxhDc2yXvY20d9NhdvqAkHOv7y64JcOb564ep4Y5FlD2pFYRhiVZaDRroO03Cs1tE4zn0ZhqRA78Wyy21AeKIV3nmWhObUDyE6eVO7tQVari3fiurSogDdJE9EmyRZzjYhhEiMpSyHYL0vVOi0W8Y7lZwX+wKp65eh2EpUJHS8DV8iALHsjAUL5j7Uwr0KET45GLXatSEv2l 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Converge on using secs_to_jiffies()
|
expand
|
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;
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 <eahariha@linux.microsoft.com> --- drivers/accel/habanalabs/common/device.c | 2 +- drivers/accel/habanalabs/common/habanalabs_drv.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)