From mboxrd@z Thu Jan 1 00:00:00 1970 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5C089D591AC for ; Mon, 18 Nov 2024 18:18:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2380510E552; Mon, 18 Nov 2024 18:18:53 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="AG9s/uyD"; dkim-atps=neutral Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by gabe.freedesktop.org (Postfix) with ESMTP id 8658210E147; Mon, 18 Nov 2024 18:18:52 +0000 (UTC) Received: from [192.168.35.166] (c-73-118-245-227.hsd1.wa.comcast.net [73.118.245.227]) by linux.microsoft.com (Postfix) with ESMTPSA id 7B6DB206BCF9; Mon, 18 Nov 2024 10:18:49 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7B6DB206BCF9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1731953932; bh=fIQzgF1WsNR1uKKNTq0/EQo7zmlio+cixqR17RrtuRg=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=AG9s/uyDx0OBII3cr4HUzEtCn4nG6edMY2UD6tMYQJ1OpbxvtlkXS/eCyyKzQSDkC KcdCHl5p58vf39EYGhD7mqQUrW1VKQADyz79vhjulvgZLmWmAZisUXU71InKFz7Poi T4lQlDCJsC2Y9ZlNmbnEUe8f/zo4dQilCRsXYjpY= Message-ID: <96f3b51b-c28c-4ea8-b61e-a4982196215f@linux.microsoft.com> Date: Mon, 18 Nov 2024 10:18:49 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Christophe Leroy , eahariha@linux.microsoft.com, 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=B6m?= , 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_Monn=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 , Joe Lawrence , Jaroslav Kysela , Takashi Iwai , Lucas Stach , Russell King , Christian Gmeiner , Louis Peens , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Madhavan Srinivasan , 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 Subject: Re: [PATCH v2 19/21] livepatch: Convert timeouts to secs_to_jiffies() To: Petr Mladek References: <20241115-converge-secs-to-jiffies-v2-0-911fb7595e79@linux.microsoft.com> <20241115-converge-secs-to-jiffies-v2-19-911fb7595e79@linux.microsoft.com> <718febc4-59ee-4701-ad62-8b7a8fa7a910@csgroup.eu> From: Easwar Hariharan Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On 11/18/2024 3:06 AM, Petr Mladek wrote: > On Sat 2024-11-16 11:10:52, Christophe Leroy wrote: >> >> >> Le 15/11/2024 à 22:26, Easwar Hariharan a écrit : >>> [Vous ne recevez pas souvent de courriers de eahariha@linux.microsoft.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] >>> >>> 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)); >> >> Using secs_to_jiffies() is pointless, 0 is universal, should become >> schedule_delayed_work(&work, 0); > > Yes, schedule_delayed_work(&work, 0) looks like the right solution. > > Or even better, it seems that the delayed work might get replaced by > a normal workqueue work. > > Anyway, I am working on a patchset which would remove this sample > module. There is no need to put much effort into the clean up > of this particular module. Do whatever is easiest for you. > > Best Regards, > Petr If we're removing the module, I'll drop it from the series. Just to clarify, do you mean to remove all of samples/livepatch/* or some particular file(s)? Thanks, Easwar