From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 A14F31798C for ; Tue, 19 Nov 2024 01:44:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731980656; cv=none; b=A16fOGoPhmWlso0mPFZKlLlPfHjpSHoYDdKFaCMzBxHYiXkgj4svvo4AzgIiViiMfP2sWDVL+/CAHsEvSxBYral+mKN8BV24brO5eCsWTZi0fRjFhnKGeiy71zNMmG10VNYM2cvkSNf2bY55kddBhEUr0R03KWv1jgaRrcLF4gM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731980656; c=relaxed/simple; bh=R1qQ0OBQz6CUZbICIx1Jgof2nor6NIrbN2iL+Kv4Iss=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=eF/EdBcIpioHKsDpSvZpaPtmVjKlmQInti5v3nJ4FufIFkYjJKneAffEjqmvxTEcRenuMX5tS+ot3TqOdUP27N/hB161eG8ZO6DThWXvRJrcOxY0QHFCG6ILE7IjgC4kIIgeFL93TPTbKmB2vKfATh5S/Ct/1IiUnGxM+QrUuvk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CYUMAfEr; arc=none smtp.client-ip=209.85.214.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CYUMAfEr" Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2124a86f4cbso3222705ad.3 for ; Mon, 18 Nov 2024 17:44:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731980653; x=1732585453; darn=lists.linux.dev; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6TLGZPhgwiSdTuoKO9EIOhX+7x+wgHfPfCEdlENWql4=; b=CYUMAfEr0s714B6SC3pFRR4xNUO6Y+rZA8BIPajJSw9hD0+ckJnhMAbI+50PYBzsw7 VDLVplNIcg0pz3/09qFooSKUJznly+GOEfwfR9wT0z+fuOXyVCAvnrygVUI2Kxp+x1tE dnbpn7zQoL0f1DGtWhuqzKxl4DSyPVII4KXtyLZh8J2s1r6ZYhSKq73937b8G/hF0vA2 pFd8quUtCq7aMfQHHc297thMWPmSZjMx2veO200h3+lOslKArP/3rGk9MN7ctQaMrOKH V2qCG/Dq62Gg7b17h8z+3XcXFtdqYQa5ATZa1F2iHpl1GGWjYK0MD174XhSFGP6JtQ2y z5RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731980653; x=1732585453; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6TLGZPhgwiSdTuoKO9EIOhX+7x+wgHfPfCEdlENWql4=; b=lZzIfJgUkY4PLxF9azFbpIwsa0+Xyj+Afdzx2xFUKuF7ExVv58MQpqPX5WfWo5P+6j 2oRGFg6MUO4pEj7VE69AfE42P1c9o+X8zU1A4jS46mAH/XBM+NEvf5YCgzdNne0nKBPt SMZyJvdqXvt3D+aUuwrlfAYmFmhXcICCa8b2Xn0szEzFmvWG/ZzXr6s7y0KtnXK5AkPp qqvRUNSgcusPjEAHoNud9h0ySNhoI/8qdkVsbFqpan2ic8b6JB4xtDch+ssON1RC8CPp hnma8213bYRPQrhg7CfHgB2shXjW5ksuYbfFWCxMR9hZCSpBX2sCBYBSQFH23mlhBDvD EAKw== X-Forwarded-Encrypted: i=1; AJvYcCXP8fkvMcV4PHwLWz4rcmBKOpLbPRZQ5I+UX/gz+IhjldbgP5DKT3gf5DrP+59HQpf+CtwI/sbzEIBB7zVf@lists.linux.dev X-Gm-Message-State: AOJu0YxKdWaRUDzf5ucCsWRvL3i0lEdM+6vmj5vNOmMXdM1sh9DLf2D8 IDIWfXCbtrzh3Djf6aetMpWaRapSkJSMH2ycQeg5EDNVcGrEeLNR X-Google-Smtp-Source: AGHT+IGKOuuVyAvdbfIttKIxJSv7PNCbNBMgaHYEIodVhJO4YNPmnFai9XI15Qs6QZqqMPXdK5RTjA== X-Received: by 2002:a17:903:186:b0:212:46c2:632e with SMTP id d9443c01a7336-21246c26707mr25423135ad.15.1731980653295; Mon, 18 Nov 2024 17:44:13 -0800 (PST) Received: from smtpclient.apple ([198.11.178.15]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211d0f6182bsm62977715ad.277.2024.11.18.17.43.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Nov 2024 17:44:12 -0800 (PST) Content-Type: text/plain; charset=utf-8 Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: [PATCH v2 19/21] livepatch: Convert timeouts to secs_to_jiffies() From: zhang warden In-Reply-To: <96f3b51b-c28c-4ea8-b61e-a4982196215f@linux.microsoft.com> Date: Tue, 19 Nov 2024 09:43:32 +0800 Cc: Petr Mladek , Christophe Leroy , 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 Content-Transfer-Encoding: quoted-printable Message-Id: <99755FD2-270C-4122-8A22-6C73A81028F6@gmail.com> 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> <96f3b51b-c28c-4ea8-b61e-a4982196215f@linux.microsoft.com> To: Easwar Hariharan X-Mailer: Apple Mail (2.3774.500.171.1.1) > On Nov 19, 2024, at 02:18, Easwar Hariharan = wrote: >=20 > On 11/18/2024 3:06 AM, Petr Mladek wrote: >> On Sat 2024-11-16 11:10:52, Christophe Leroy wrote: >>>=20 >>>=20 >>> Le 15/11/2024 =C3=A0 22:26, Easwar Hariharan a =C3=A9crit : >>>> [Vous ne recevez pas souvent de courriers de = eahariha@linux.microsoft.com. D=C3=A9couvrez pourquoi ceci est important = =C3=A0 https://aka.ms/LearnAboutSenderIdentification ] >>>>=20 >>>> Changes made with the following Coccinelle rules: >>>>=20 >>>> @@ constant C; @@ >>>>=20 >>>> - msecs_to_jiffies(C * 1000) >>>> + secs_to_jiffies(C) >>>>=20 >>>> @@ constant C; @@ >>>>=20 >>>> - msecs_to_jiffies(C * MSEC_PER_SEC) >>>> + secs_to_jiffies(C) >>>>=20 >>>> 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(-) >>>>=20 >>>> diff --git a/samples/livepatch/livepatch-callbacks-busymod.c = b/samples/livepatch/livepatch-callbacks-busymod.c >>>> index = 378e2d40271a9717d09eff51d3d3612c679736fc..d0fd801a7c21b7d7939c29d83f9d993b= adcc9aba 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)); >>>=20 >>> Using secs_to_jiffies() is pointless, 0 is universal, should become >>> schedule_delayed_work(&work, 0); >>=20 >> Yes, schedule_delayed_work(&work, 0) looks like the right solution. >>=20 >> Or even better, it seems that the delayed work might get replaced by >> a normal workqueue work. >>=20 >> 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. >>=20 >> Best Regards, >> Petr >=20 > 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)? >=20 > Thanks, > Easwar >=20 Hi Easwar! I think Petr is going to remove just this module away. Anyway, I don't = think removing all of them is a good idea. Thanks. Wardenjohn.=20