From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16AFC194C7A for ; Mon, 18 Nov 2024 11:06:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731928007; cv=none; b=jGtA5hzPwjHRc9F9Zg+eeRiumsv0+LUYBXinTqcEMM4ugMfjRRlcmeMi8Let2fueMnkRXkybOk0WtglXI++kJNweCUnUBkaIgn9Yinri4N2SUQf8nxGrF3cYV7AnrQdox44CmPDzf3zU/QqMkRYn4//ISoZgpzDsKILM388DS9g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731928007; c=relaxed/simple; bh=IFcBtIn1LqFVelHm7kG7/Vy3ppN0z+ueq8gYg8sWEas=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=W487zghpAWJMzz2pqilNnZctzBWgRkwtRLvKAwgSNrUudCyLNMmq0EZDaDdT0UFmAz3Sa8JGxO4qoIAIsIUWC2s7ePyTT0pplOZ5Yr15gS79cpMcOhhLNGV1+2H/KaFq0VCM1qzm122V5z4hDBcrpyfiXBPZ4jqvpBiTfzMGYtc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Bgylq0v1; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Bgylq0v1" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-38232cebb0cso1490609f8f.1 for ; Mon, 18 Nov 2024 03:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1731928002; x=1732532802; darn=lists.linux.dev; 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=Bgylq0v193+x+8HacLZf5NsAYuEhYYjrJE1So/qkshWPH/0v4Vuhmz4t/2tHtPVW48 JEItFuHl1WC+2VI4zWj3uCbUFwBcEi1mC4uj/bLhw53cuFk7By0W6cmkrK3joCa6aTQB 8iI+Lr6swDHrjJlspAH1i5L3363BwDVPHct0umpJgFJhgaEN9W66gXPSsHmFcDxgbNt7 obquWccrVA8iBbabZ1TYiqGHC7IUqcqjKvSrgloUFDrGfZbWhn1ZRZBR+7htjBWFGLwr 79bx0ZdSFQ0WGjUckxbTX9e3z3f5aDfPlaausA2xJrxa8pGxCZ4rtJrfcNl6/qkfPAt+ 1F9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731928002; x=1732532802; 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=qQyuHxTsql41Ysggv9tOCXBWs+LHPHmBcbhYmreZLiHZn6W04HzMLSqhdU37Lim8lX xEdJ6iPruJOLaEQAAbY4VIxeIXLWnLR46F9cIGDZhJHJO8j+FUvr28MTFekFMJeUERQB p6wMo2fuOX3irSnBsaseRHFl3uydyFxgSDQsBWmTFYMVfTDQJphDfkSiXL4tIYmHmcbE v7I3e6qGHfc7oESsgtnPjCsg499N4UOAT6WNEYSNRb20tgJkvTjbgcn+6Ka6ybWSqJbl fo5vAxilczSI24c1Uho2o7mAqG2vz8u8HcBgAiXinp8wDXDzK0mY96ijt3r/vXT2MvGU Ps9g== X-Forwarded-Encrypted: i=1; AJvYcCUon40+rsoQU0hn+7CxcpaW8eqUeaJLLxexI6/03q39Kk90pfiMdTGMMwtujwzLrgdoLavL2NFoP6ogG0T/@lists.linux.dev X-Gm-Message-State: AOJu0Yz7pltPuqvi2hkt968UCyXzEviMERPmhdzrU/T+M7m3pzAqAAwc 7Kz/gFIF7wh3YN/Hwxs0w5Bfrz+8qYydwG5nunMK6CxDIJPjMX7uVwFpfhTKCtg= 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> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: 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