Message ID | 20241115-converge-secs-to-jiffies-v1-7-19aadc34941b@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 EA8F8D68BDC for <linux-mm@archiver.kernel.org>; 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 <linux-mm@kvack.org>; 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 <linux-mm@kvack.org>; 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 <linux-mm@kvack.org>; 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 <eahariha@linux.microsoft.com> 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 <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-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/zyGMP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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(-)