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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 5A714D4920C for ; Mon, 18 Nov 2024 11:15:08 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4XsQ5Q49C8z2xtt; Mon, 18 Nov 2024 22:15:06 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip="2a00:1450:4864:20::635" ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1731928506; cv=none; b=BnKB/wkZkFOXnco+6c6T9jElSB+LEWfYqFbmtXPh6pzgcezyTfbaXJaWlkiy3MLTF/GyMSgI4bKGmX+feAfKXOgOUjShtx4FNRwn2Qfl5m1jxYZCJDaITTnJ5eWSFSwixj8JwZ5QtORb7eNZiSLL4LvgY+WdII16+Sf5a5UxjpovQR3JBZe5y58gxcZENTRC5SPqGONMmC+tAplvmi5/WqaS4uoyvGFH+Rd9ECQESTMamInnAVZxzcsnVwK5Aki+6g6cQViFTbzryax8WDZGELrGX56aDo0LXQGN2dRIusDHVPNusE+vfhzvGtdc8hdkSc9KNr27DtyfytQTJMyTAQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1731928506; c=relaxed/relaxed; bh=Q4K7ZFgLQYJQlGAzpq8RK54g3EqKOomWWOR+yhsr1qw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IRj2t7AteVkXvbf/Dt16opEbGEwORXpPRmjYao1bxdUnAF7On/j9W7PBU3hOOjVnTah4wq30cWC0GljanAPWlWFS3epdJyfMXtJT8bQcImaS9zfu+gg2gcBcjtdLEPY7I9f8sQvljHRxm516xSXG65sOoFdmbBBeyb0//PMvyqHD6x1p4alUCEPtMhDTgQQLbqZaARg0xC8YcpBSglsM4Z/W0EYU9gKO72owUKZkRtP5qFb14ZqIMLqC5AAkr3C2+x9hV9WU8EcAYOrChs51fcLMc3yaIONiOa0AOVj0h29nJO1uvBFIm3u6yaQwtkMq+lMh0j24jCXuUa7QHxOPTg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; dkim=pass (2048-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=KZ4VGnxK; dkim-atps=neutral; spf=pass (client-ip=2a00:1450:4864:20::635; helo=mail-ej1-x635.google.com; envelope-from=pmladek@suse.com; receiver=lists.ozlabs.org) smtp.mailfrom=suse.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=KZ4VGnxK; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=suse.com (client-ip=2a00:1450:4864:20::635; helo=mail-ej1-x635.google.com; envelope-from=pmladek@suse.com; receiver=lists.ozlabs.org) Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4XsQ5P1Mhvz2xy0 for ; Mon, 18 Nov 2024 22:15:02 +1100 (AEDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a9ef275b980so500620866b.0 for ; Mon, 18 Nov 2024 03:15:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1731928499; x=1732533299; darn=lists.ozlabs.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=Q4K7ZFgLQYJQlGAzpq8RK54g3EqKOomWWOR+yhsr1qw=; b=KZ4VGnxKGmtHcxOK4AJ3rUjc6KW8orOsID1CfEBRXZpDelEYBPyUc6Bf8W3tPrX8c+ sY8oD6vERlCNfKkHQ2RzZn1DwLxLJFRwBXnplRKMZLFDl+aiqc+C1BkW/ViWZOdpvnxC fWnPDpTr1ng3hu11UZY61lJEuY2pEFgi9SdfVZN+MANYKERqsuNpoSEMkMeEtNsv23Hr nNZJQ79UfyNTXkL62+bx6VTyDYfgUlqgCEzsSDlIfrdjdw9PFc8pcOWHgaNl+evSOXou 9JUFjTe19uW7EddXzhzT8txeXN/xskvqCb4X0/ggeVBVZyZ2AXEcIshJgPz9tT3DUAbM PDnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731928499; x=1732533299; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Q4K7ZFgLQYJQlGAzpq8RK54g3EqKOomWWOR+yhsr1qw=; b=GWjXSmkSaKdTMNoKsbUc5fbnAl0y7zCRP1BUTsWHd4Fcdvikq2VIRiNFMrQ1oETeRP USU7y4hP9BbwAj4b9FguvHHltCP78P6DYH3qwRbs/PaUt64d/7Jqc4kizVyTErhqnnhO AIeRSeB2UfANVliSB2sxGSDZ3nvNxJ6LuEhcQGypNTnajwoEC79IByFnmP3rKC3tpTG0 0Bg0mj0pjEIp+JzARtSs+YiofMGhjYTo2V48kUgnPmkDMY0PC0QyqNTecx29xrIVuNak 3wAXKFkIP1nBPQU1HUu2onO4neXxTMp5g+2NIHyGGDcG0gxdwEP8mxUDKQ/we184EcDT pxyA== X-Forwarded-Encrypted: i=1; AJvYcCVlx8hU8/Hlu5cdLPm+74CSJjLI7yfW2FTb8UFyNRgaR6l544fEBbrPY2Ehm1At7WzGA+3jybgcjRXbHxk=@lists.ozlabs.org X-Gm-Message-State: AOJu0Yyen92kCCA14aMPtIwqmL7ZeJCJ4/i71DH9hJ0JiD37TG61VNTj yxa4BZHp6hq7gDkMXdx6Imf+qIWrm4gAt2grJ50OcKSAJvD8y/KtZvFwEyVzod+jRlJuirFP/wF RNaA= X-Google-Smtp-Source: AGHT+IEHvVmgRYFNhCs4UC7E5RjVk5JwGYVdnUZOYcUXsiEIWSohYFEZO8cTVp2lMrq4C8xPl0BQ1Q== X-Received: by 2002:a05:6000:18af:b0:37d:4ef1:1820 with SMTP id ffacd0b85a97d-38225a91e80mr10392779f8f.40.1731928002298; Mon, 18 Nov 2024 03:06:42 -0800 (PST) Received: from pathway.suse.cz ([176.114.240.50]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38242eef982sm4319340f8f.8.2024.11.18.03.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 03:06:41 -0800 (PST) Date: Mon, 18 Nov 2024 12:06:34 +0100 From: Petr Mladek To: Christophe Leroy Cc: Easwar Hariharan , 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 , Thomas =?iso-8859-1?Q?Hellstr=F6m?= , 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" , Roger Pau =?iso-8859-1?Q?Monn=E9?= , 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() Message-ID: 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> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <718febc4-59ee-4701-ad62-8b7a8fa7a910@csgroup.eu> 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