[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cocci] [PATCH v2 02/21] coccinelle: misc: Add secs_to_jiffies script
- To: Easwar Hariharan <eahariha@xxxxxxxxxxxxxxxxxxx>, cocci@xxxxxxxx
- From: Markus Elfring <Markus.Elfring@xxxxxx>
- Date: Sat, 16 Nov 2024 11:23:01 +0100
- Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>, kernel-janitors@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, intel-xe@xxxxxxxxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-wireless@xxxxxxxxxxxxxxx, ath11k@xxxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-bluetooth@xxxxxxxxxxxxxxx, linux-staging@xxxxxxxxxxxxxxx, linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, live-patching@xxxxxxxxxxxxxxx, linux-sound@xxxxxxxxxxxxxxx, etnaviv@xxxxxxxxxxxxxxxxxxxxx, oss-drivers@xxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, Anna-Maria Behnsen <anna-maria@xxxxxxxxxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxx>, Julia Lawall <Julia.Lawall@xxxxxxxx>, Nicolas Palix <nicolas.palix@xxxxxxx>, Daniel Mack <daniel@xxxxxxxxxx>, Haojian Zhuang <haojian.zhuang@xxxxxxxxx>, Robert Jarzmik <robert.jarzmik@xxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>, Vasily Gorbik <gor@xxxxxxxxxxxxx>, Alexander Gordeev <agordeev@xxxxxxxxxxxxx>, Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>, Sven Schnelle <svens@xxxxxxxxxxxxx>, Ofir Bitton <obitton@xxxxxxxxx>, Oded Gabbay <ogabbay@xxxxxxxxxx>, Lucas De Marchi <lucas.demarchi@xxxxxxxxx>, Thomas Hellström <thomas.hellstrom@xxxxxxxxxxxxxxx>, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>, Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>, Jeroen de Borst <jeroendb@xxxxxxxxxx>, Praveen Kaligineedi <pkaligineedi@xxxxxxxxxx>, Shailend Chand <shailend@xxxxxxxxxx>, Andrew Lunn <andrew+netdev@xxxxxxx>, James Smart <james.smart@xxxxxxxxxxxx>, Dick Kennedy <dick.kennedy@xxxxxxxxxxxx>, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, Kalle Valo <kvalo@xxxxxxxxxx>, Jeff Johnson <jjohnson@xxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Jack Wang <jinpu.wang@xxxxxxxxxxxxxxx>, Marcel Holtmann <marcel@xxxxxxxxxxxx>, Johan Hedberg <johan.hedberg@xxxxxxxxx>, Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>, Ray Jui <rjui@xxxxxxxxxxxx>, Scott Branden <sbranden@xxxxxxxxxxxx>, Broadcom internal kernel review list <bcm-kernel-feedback-list@xxxxxxxxxxxx>, Xiubo Li <xiubli@xxxxxxxxxx>, Ilya Dryomov <idryomov@xxxxxxxxx>, Josh Poimboeuf <jpoimboe@xxxxxxxxxx>, Jiri Kosina <jikos@xxxxxxxxxx>, Miroslav Benes <mbenes@xxxxxxx>, Petr Mladek <pmladek@xxxxxxxx>, Joe Lawrence <joe.lawrence@xxxxxxxxxx>, Jaroslav Kysela <perex@xxxxxxxx>, Takashi Iwai <tiwai@xxxxxxxx>, Lucas Stach <l.stach@xxxxxxxxxxxxxx>, Russell King <linux+etnaviv@xxxxxxxxxxxxxxx>, Christian Gmeiner <christian.gmeiner@xxxxxxxxx>, Louis Peens <louis.peens@xxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Nicholas Piggin <npiggin@xxxxxxxxx>, Christophe Leroy <christophe.leroy@xxxxxxxxxx>, Naveen N Rao <naveen@xxxxxxxxxx>, Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>
- Delivery-date: Sat, 16 Nov 2024 10:23:54 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Ui-outboundreport: notjunk:1;M01:P0:cqxyRecUHWI=;mdNOJxMPXJ1GyzF//eKGdLZ+Q8F gZOm7zXyKp5nkSwMIvY2D1Pf29OTgIQNnEk2sxWaloC9j5qlT3qQUm44Qe1eN8K2TrIb7Ylam rbOIjXCI16gwyjr6u6Tm4wzXx3QEqIRDJ6vPTxa1qCHZ5nXH9awzzielfDD+nIYBqn+NysMC0 QZsEszMBUB9IXfIsHktBfi8cBsv+k0746M1afH1AQnbUe7vbWDpvJQfebcg6n+Wz3fvdqxIZD kSPPyScjl7oMRh9gl8//4l2V7VzBO9LPR7x4sdROj+PLFL3oFRJx+0h1y9SyUqJ0GnPpxdEL0 PMzZq88Rt40rnD8qxMQHh7I/uNcMzG6WX18JYqJkBzSmPhgPNeCMeiVI23Ufs+Q4nUJ3qhDsK 0p5vEIj2tML+6DTh9sRN/Vkr1Nv2iQxQGIWmrKuhxE6H4MNkCnw+r/vzSC3EjHoSsbQuNjTP7 r+pzwFQBW5yKjimU/E0otnHQxITegw0hqubdGvkG7V+M9Xbvv+rLAmjIvBciAuyFg9KBmCLA8 CWrj3n83t/hiJIglwxY4Dk0jEZxvykwS9+BkMPoCtPW+iQ8gW/25w94Qj8e0xURq8TAcN0dXU AuweP7ynvWG484eB8hCbKDvioN+mlpMsRwjC2FQlrRm4HHD/6yeo6jL47sG63P4yysOuS2zfg IN1JwCXmYpKMSvSbVFw4XwyvjYvlKQDYKIw85OFcoZ0jKCnyiqcKt/8cDr+RhTK1EOdwwhDck OYb6KgYNVujGNSJD3nwWyFRxhnrOGI6zg/KUG07nQrZrZUdDjSpdUqLqFAptM+j5kRW2zaeV7 aAINj3gIMOnIF9IxH3vxoaq7UZVlr1ioWkWYi8cog6WCU27yEI6la8XQh2utvVDIt3r9tDYKA xoMAYChjmKcdRYrZMLRfSf6EiCXhz9YR9r6L9u2NSImvIGamFAFskjhIg
Why is a change description missing here?
…
> +++ 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
|