[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aeacb653-efb8-42ed-a7ed-3e7be31b8f9d@linux.microsoft.com>
Date: Wed, 29 Jan 2025 09:38:38 -0800
From: Easwar Hariharan <eahariha@...ux.microsoft.com>
To: Ricardo Ribalda <ribalda@...omium.org>
Cc: Julia Lawall <Julia.Lawall@...ia.fr>,
Nicolas Palix <nicolas.palix@...g.fr>,
Andrew Morton <akpm@...ux-foundation.org>, eahariha@...ux.microsoft.com,
cocci@...ia.fr, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] coccinelle: misc: secs_to_jiffies script: Create dummy
report
On 1/29/2025 12:06 AM, Ricardo Ribalda wrote:
> 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@...omium.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.")
> +@...ipt:python depends on report@
> +@@
>
Sorry about that, and thanks for the patch!
FWIW,
Reviewed-by: Easwar Hariharan <eahariha@...ux.microsoft.com>
Powered by blists - more mailing lists