mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] coccinelle: misc: secs_to_jiffies script: Create dummy report
@ 2025-01-29  8:06 Ricardo Ribalda
  2025-01-29  8:36 ` Markus Elfring
  2025-01-29 17:38 ` [PATCH] " Easwar Hariharan
  0 siblings, 2 replies; 11+ messages in thread
From: Ricardo Ribalda @ 2025-01-29  8:06 UTC (permalink / raw)
  To: Julia Lawall, Nicolas Palix, Andrew Morton, Easwar Hariharan
  Cc: cocci, linux-kernel, Ricardo Ribalda

When running cocci in report mode, eg:
$make coccicheck M="$dir" MODE=report

It returns this error:
virtual rule report not supported
coccicheck failed
make: *** [Makefile:251: __sub-make] Error 2

Create a dummy rule to avoid this error and run the other cocci scripts.

Fixes: 551dbd1ec7ff ("coccinelle: misc: add secs_to_jiffies script")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 scripts/coccinelle/misc/secs_to_jiffies.cocci | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/coccinelle/misc/secs_to_jiffies.cocci b/scripts/coccinelle/misc/secs_to_jiffies.cocci
index 8bbb2884ea5d..2d85dca16418 100644
--- a/scripts/coccinelle/misc/secs_to_jiffies.cocci
+++ b/scripts/coccinelle/misc/secs_to_jiffies.cocci
@@ -10,6 +10,7 @@
 //
 
 virtual patch
+virtual report
 
 @depends on patch@ constant C; @@
 
@@ -20,3 +21,8 @@ virtual patch
 
 - msecs_to_jiffies(C * MSEC_PER_SEC)
 + secs_to_jiffies(C)
+
+// Dummy rule for report mode that would otherwise be empty and make spatch
+// fail ("No rules apply.")
+@script:python depends on report@
+@@

---
base-commit: 05dbaf8dd8bf537d4b4eb3115ab42a5fb40ff1f5
change-id: 20250129-secs_to_jiffles-26756c671f0b

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-06-11  7:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-29  8:06 [PATCH] coccinelle: misc: secs_to_jiffies script: Create dummy report Ricardo Ribalda
2025-01-29  8:36 ` Markus Elfring
2025-01-29  8:40   ` Ricardo Ribalda
2025-01-29  8:46     ` Markus Elfring
2025-01-29  9:51       ` Victor Gambier
2025-01-29  9:56         ` Markus Elfring
2025-01-31 10:05         ` Markus Elfring
2025-01-29 17:38 ` [PATCH] " Easwar Hariharan
2025-06-10 13:09   ` Ricardo Ribalda
2025-06-10 17:35     ` Easwar Hariharan
2025-06-11  7:59       ` Ricardo Ribalda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome