Coccinelle archive mirror
 help / color / mirror / Atom feed
From: Songwei Chai <songwei.chai@oss.qualcomm.com>
To: Nicolas Palix <nicolas.palix@imag.fr>,
	Julia Lawall <Julia.Lawall@inria.fr>,
	cocci@inria.fr
Cc: linux-kernel@vger.kernel.org,
	Tingwei Zhang <tingwei.zhang@oss.qualcomm.com>,
	jinlong.mao@oss.qualcomm.com
Subject: Re: [cocci] [PATCH v2] scripts: coccicheck: filter *.cocci files by MODE
Date: Mon, 27 Oct 2025 10:39:22 +0800	[thread overview]
Message-ID: <d2fd354a-e3a9-491f-b5cc-86040b037ebe@quicinc.com> (raw)
In-Reply-To: <54b6e30f-a194-4f5f-9df4-5df0d3d4d738@imag.fr>

Hi Nicolas/Julia,

Noticed this patch has stalled after being ACKed.

Could you please help review it and assist in pushing it forward for 
merging?

Thanks.

On 6/6/2025 3:26 PM, Nicolas Palix wrote:
> Le 06/06/2025 à 08:09, Songwei Chai a écrit :
>> Enhance the coccicheck script to filter *.cocci files based on the
>> specified MODE (e.g., report, patch). This ensures that only compatible
>> semantic patch files are executed, preventing errors such as:
>>
>>      "virtual rule report not supported"
>>
>> This error occurs when a .cocci file does not define a 'virtual <MODE>'
>> rule, yet is executed in that mode.
>>
>> For example:
>>
>>      make coccicheck M=drivers/hwtracing/coresight/ MODE=report
>>
>> In this case, running "secs_to_jiffies.cocci" would trigger the error
>> because it lacks support for 'report' mode. With this change, such files
>> are skipped automatically, improving robustness and developer
>> experience.
>>
>> Signed-off-by: Songwei Chai <quic_songchai@quicinc.com>
> Acked-by: Nicolas Palix <nicolas.palix@imag.fr>
>> ---
>>   scripts/coccicheck | 6 +++++-
>>   1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/scripts/coccicheck b/scripts/coccicheck
>> index 0e6bc5a10320..89d591af5f3e 100755
>> --- a/scripts/coccicheck
>> +++ b/scripts/coccicheck
>> @@ -270,7 +270,11 @@ fi
>>     if [ "$COCCI" = "" ] ; then
>>       for f in `find $srctree/scripts/coccinelle/ -name '*.cocci' 
>> -type f | sort`; do
>> -    coccinelle $f
>> +        if grep -q "virtual[[:space:]]\+$MODE" "$f"; then
>> +                coccinelle $f
>> +        else
>> +                echo "warning: Skipping $f as it does not match mode 
>> '$MODE'"
>> +        fi
>>       done
>>   else
>>       coccinelle $COCCI
>>
>

  reply	other threads:[~2025-10-27  9:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-06  6:09 [cocci] [PATCH v2] scripts: coccicheck: filter *.cocci files by MODE Songwei Chai
2025-06-06  7:26 ` Nicolas Palix
2025-10-27  2:39   ` Songwei Chai [this message]
2025-11-05  1:53     ` Songwei Chai
2025-11-07  8:05 ` Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d2fd354a-e3a9-491f-b5cc-86040b037ebe@quicinc.com \
    --to=songwei.chai@oss.qualcomm.com \
    --cc=Julia.Lawall@inria.fr \
    --cc=cocci@inria.fr \
    --cc=jinlong.mao@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.palix@imag.fr \
    --cc=tingwei.zhang@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).