[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250203-converge-secs-to-jiffies-part-two-v2-1-d7058a01fd0e@linux.microsoft.com>
Date: Mon, 03 Feb 2025 23:50:22 +0000
From: Easwar Hariharan <eahariha@...ux.microsoft.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Julia Lawall <Julia.Lawall@...ia.fr>, Nicolas Palix <nicolas.palix@...g.fr>,
Ilya Dryomov <idryomov@...il.com>,
Dongsheng Yang <dongsheng.yang@...ystack.cn>, Jens Axboe <axboe@...nel.dk>,
Xiubo Li <xiubli@...hat.com>
Cc: cocci@...ia.fr, linux-kernel@...r.kernel.org,
ceph-devel@...r.kernel.org, linux-block@...r.kernel.org,
Easwar Hariharan <eahariha@...ux.microsoft.com>
Subject: [PATCH v2 1/3] coccinelle: misc: secs_to_jiffies: Patch
expressions too
Teach the script to suggest conversions for timeout patterns where the
arguments to msecs_to_jiffies() are expressions as well.
Signed-off-by: Easwar Hariharan <eahariha@...ux.microsoft.com>
---
scripts/coccinelle/misc/secs_to_jiffies.cocci | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/scripts/coccinelle/misc/secs_to_jiffies.cocci b/scripts/coccinelle/misc/secs_to_jiffies.cocci
index 8bbb2884ea5db939c63fd4513cf5ca8c977aa8cb..416f348174ca659b544441f5f68f04a41d1ad4a3 100644
--- a/scripts/coccinelle/misc/secs_to_jiffies.cocci
+++ b/scripts/coccinelle/misc/secs_to_jiffies.cocci
@@ -20,3 +20,13 @@ virtual patch
- msecs_to_jiffies(C * MSEC_PER_SEC)
+ secs_to_jiffies(C)
+
+@...ends on patch@ expression E; @@
+
+- msecs_to_jiffies(E * 1000)
++ secs_to_jiffies(E)
+
+@...ends on patch@ expression E; @@
+
+- msecs_to_jiffies(E * MSEC_PER_SEC)
++ secs_to_jiffies(E)
--
2.43.0
Powered by blists - more mailing lists