Thread (62 messages) 62 messages, 18 authors, 2024-12-09

Re: [cocci] [PATCH v2 02/21] coccinelle: misc: Add secs_to_jiffies script

From: Markus Elfring <hidden>
Date: 2024-11-16 10:25:03
Also in: ath11k, ceph-devel, cocci, dri-devel, intel-xe, kernel-janitors, linux-block, linux-bluetooth, linux-mm, linux-s390, linux-scsi, linux-sound, linux-staging, linux-wireless, linuxppc-dev, live-patching, lkml, netfilter-devel, xen-devel

Why is a change description missing here?


…
quoted hunk ↗ jump to hunk
+++ b/scripts/coccinelle/misc/secs_to_jiffies.cocci
@@ -0,0 +1,21 @@
+/// Find usages of:
+/// - msecs_to_jiffies(value*1000)
+/// - msecs_to_jiffies(value*MSEC_PER_SEC)
I suggest to take another look at corresponding development documentation.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/dev-tools/coccinelle.rst?h=v6.12-rc7#n71

Will the attention grow for the proper usage of operation modes
according to the tool “coccicheck”?


…
+// Copyright: (C) 2024 Easwar Hariharan Microsoft
Should personal details and company names be better distinguished in such information?

+//
+// Keywords: secs, seconds, jiffies
May a (blank) comment line be omitted here?

+@@ constant C; @@
+
+- msecs_to_jiffies(C * 1000)
++ secs_to_jiffies(C)
+
+@@ constant C; @@
+
+- msecs_to_jiffies(C * MSEC_PER_SEC)
++ secs_to_jiffies(C)
I suggest to take a SmPL code variant (like the following)
better into account.


@depends on patch@
constant C;
@@
-msecs_to_jiffies
+secs_to_jiffies
 (C
- * \( 1000 \| MSEC_PER_SEC \)
 )


Can any expressions become relevant besides “constants”?

Regards,
Markus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help