From patchwork Tue Dec 10 22:02:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 13902174 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 448F7E77182 for ; Tue, 10 Dec 2024 22:03:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 423B06B00A0; Tue, 10 Dec 2024 17:02:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AB426B00A1; Tue, 10 Dec 2024 17:02:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D8FB6B00A4; Tue, 10 Dec 2024 17:02:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id F08D06B00A1 for ; Tue, 10 Dec 2024 17:02:44 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 9072B140BC5 for ; Tue, 10 Dec 2024 22:02:44 +0000 (UTC) X-FDA: 82880424228.16.2A72531 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by imf12.hostedemail.com (Postfix) with ESMTP id 0C4314001C for ; Tue, 10 Dec 2024 22:02:32 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=IIAWMyJ8; spf=pass (imf12.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1733868152; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=DhJBfAD2d6ET0f+MR7PDWaX6CpgYhpsGb+RQrMGIOAY=; b=RxmOuGprg32FjPGtDiN67eklh606852tcbMM3lZr5DTHU2Fta38CjE2Aq/zE+STYjif+fq 2sCjRl0sCyRn0xefCL19f5pCcOWLR7fvbHOSm5fU7zA4CGetIfb0FlOtSiEu4WvOVui+2Z nmTy3WX/Uc49DdJj/67ok16Hl6NlYGg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1733868152; a=rsa-sha256; cv=none; b=zSuFpTxz9+VpN8ksGcPAvzIBD8x69kkw9agzWRzWDp/z4enunWhC/pWV8Bp8diFldnVii3 rRtlMFCjZXP2YvXBEtqwdk6k+KLjLnEnNl02KquFDKOFpj7KehAqPoQ2qaECAp/pchtclj 7J/xr+ZyIE+VM2bZoEQIDEeXqon5hS0= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=linux.microsoft.com header.s=default header.b=IIAWMyJ8; spf=pass (imf12.hostedemail.com: domain of eahariha@linux.microsoft.com designates 13.77.154.182 as permitted sender) smtp.mailfrom=eahariha@linux.microsoft.com; dmarc=pass (policy=none) header.from=linux.microsoft.com Received: from eahariha-devbox.internal.cloudapp.net (unknown [40.91.112.99]) by linux.microsoft.com (Postfix) with ESMTPSA id D4E6A204722D; Tue, 10 Dec 2024 14:02:37 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D4E6A204722D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733868158; bh=DhJBfAD2d6ET0f+MR7PDWaX6CpgYhpsGb+RQrMGIOAY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=IIAWMyJ8NzQC8a9Pk8dz0U3jdNgu9NGd3SiawGSbAFHI2lBJj9kVVY+Jrn6mOAaem Wm2Q0riPqkUNNLsJAJDVn84Us2zbSxk2FObucA7BvA+Ci0Obga6BtVUEDHD7pm4PpM tPAQA1jtOYji99byX6HP0p2SzC0hDQD6638LF7MQ= From: Easwar Hariharan Date: Tue, 10 Dec 2024 22:02:39 +0000 Subject: [PATCH v3 08/19] drm/xe: Convert timeout to secs_to_jiffies() MIME-Version: 1.0 Message-Id: <20241210-converge-secs-to-jiffies-v3-8-ddfefd7e9f2a@linux.microsoft.com> References: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> In-Reply-To: <20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@linux.microsoft.com> To: Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Julia Lawall , Nicolas Palix , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Ofir Bitton , Oded Gabbay , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jeroen de Borst , Praveen Kaligineedi , Shailend Chand , Andrew Lunn , James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" , =?utf-8?q?Roger_Pau_Mon?= =?utf-8?q?n=C3=A9?= , Jens Axboe , Kalle Valo , Jeff Johnson , Catalin Marinas , Andrew Morton , Jack Wang , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Xiubo Li , Ilya Dryomov , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Louis Peens , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Madhavan Srinivasan Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, linux-mm@kvack.org, linux-bluetooth@vger.kernel.org, linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, ceph-devel@vger.kernel.org, live-patching@vger.kernel.org, linux-sound@vger.kernel.org, oss-drivers@corigine.com, linuxppc-dev@lists.ozlabs.org, Anna-Maria Behnsen , Easwar Hariharan X-Mailer: b4 0.14.2 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 0C4314001C X-Stat-Signature: bjh4ikebhdsfn1mp9fo4m4mzxyrwqqc9 X-Rspam-User: X-HE-Tag: 1733868152-876182 X-HE-Meta: U2FsdGVkX1+E3J8mnbE8T9DqYzprBJ7MWfSUNMey43sAA7sNeqJXYfqdnZdu8KP6GKcjQHkVB8lC4d27oNeNKz1j/+py0Oo+W6IQRTZy0hxFDTpKUT7yKeEZh8ZlHEYabpZqZxLTzT8xwKaREQDmrzuNpV0nWkZJ2bf1uJ7eKkymrsGN4ar7lU6+PYjqeUNJ6uVJdAhtezW9a5b8ow96jCT2iZPvLfpW7WJ81CoqYN+C+ahAf48S/7sC0iiNLo74kCa93ydXRdVtIXNQzoNNYxvAG1zybezgxs/YuiBEXRrvIXIZaXDhS5vLE/Virr7tVr2oS0nJCKqKmV11TtruAoyZF4AD9KJaFbKRIZwu/5dJH0rBr9NiRJxHyEL6MXEgOMPDrf2xDdFiZE/B8YiJV40UgR84Zv/8o4gao+Kg6vv4v6Dx/zGWsg98F0VqwnMDBfrTMhzBVm/EHEK/gTwlkI+1wgc8UXfWdGm70SIYNrGvHhXJwQ+pG+c8jEc2FUhboAbZn8D9f35no0v9QWY0OwDTGxwuMjRCpijhNSfOxEtGTSBya2ro644wPzZQ1Pe+qE2gieu0+x7j45XX/xOWoMSIzRoHhBTLQyYvHOCrFkJ3UPEVMy3iVEHh7lzLjyYuJnMZx2rC+WBFfzoaiwjKuDLCO1IzEcTclNRmmN8aK9xSOiGOYerdoh/7YI+D5TJwJvcDo7mfB+ep1tZtL6whYXCJirsQsSAFey1nx8fzMmgpRiHLR+MFOwvd9hqMTfKRUm+jClb4YNPgLHEBKdBWxxI9PHZRULnnFM1u5/o4kIGV55HjUAnrkN3RH7uYWfF1p2DCGWAlsmyrlYvZg6Qk9HDs74LMxilS5pWcJVQdnAvgzd+ZQtj91H36w69ajN26pYisT1ZlWKQpIWumZykXZQODReh5WJS8YHmxKN37IBQneYhK0sMql/EhoMDTzdrnEtimxshk8x+QwgxT5oa HgyLKJpU +TcsjulIwqSRahX4ljXBDv6F1nPxwahEKLy5CDU6KLUxgUJJi/PQoeij5gnWsT1/20LrX6XXF3pn+QdlbKDqv9FTlnhV6584FMbhM3cWjMe264BzTW/ug5Goq7MbBe9cm6nD542EQd0IUf3NkE30eSWToG6n0cO+kQnwGowMDZOU0+Vi37rniJrjBAUWSpgwSI8lk1YGlGS0pZaRDunUQvxhW59lPIgl4BGxv5wGURUgFua1CQQrcjVStR5eC/dxYSR7S3BzY+XMDN0W/BORJ+zDytKtFPlLFJSWfxg/uzK9VdEvhKbRb7rlgSPlXo3N47T/IPqwY6VXkj3SRrV9MVIcVK4ZY0h2kH4cNmwY3lIxysEe9hAKWLkV1jXJwyUfYBo3tsf+RnVlARmAtFU2X5IsR0n0q2QuB4oI2k5aul1i4C8AgEjHpqOlCj0299i5X3M8WLdO18mO0hrCrOpDwTJukNFFPZK+xq475 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication. This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with the following Coccinelle rules: @@ constant C; @@ - msecs_to_jiffies(C * 1000) + secs_to_jiffies(C) @@ constant C; @@ - msecs_to_jiffies(C * MSEC_PER_SEC) + secs_to_jiffies(C) Reviewed-by: Thomas Hellström Signed-off-by: Easwar Hariharan --- drivers/gpu/drm/xe/xe_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 56d4ffb650dade8622cc25026a96155fa5572434..9093469a275f46f7bf58ff1049c1c9cc712cdd33 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -519,7 +519,7 @@ static int wait_for_lmem_ready(struct xe_device *xe) drm_dbg(&xe->drm, "Waiting for lmem initialization\n"); start = jiffies; - timeout = start + msecs_to_jiffies(60 * 1000); /* 60 sec! */ + timeout = start + secs_to_jiffies(60); /* 60 sec! */ do { if (signal_pending(current))