From: Markus Elfring <Markus.Elfring@web.de>
To: cocci@inria.fr
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Restricting SmPL disjunctions for identifier selections?
Date: Tue, 11 Aug 2026 10:15:18 +0200 [thread overview]
Message-ID: <295006f6-067d-4d85-9604-c505db13cd5a@web.de> (raw)
Hello,
Another tiny script variant for the semantic patch language can eventually help
to clarify special development ideas.
@my_test@
expression x;
@@
*x =
(kmalloc
|kstrdup
)(...)
Questionable test result (according to the software combination “Coccinelle 1.3.1”):
Markus_Elfring@Sonne:…/Projekte/Coccinelle/Probe> /usr/bin/spatch --parse-cocci test-disjunction.cocci
init_defs_builtins: /usr/lib64/coccinelle/standard.h
@my_test@
expression x;
@@
(
*x *= kmalloc(...)
|
*x *= kstrdup(...)
)
Grep query
kstrdup || kmalloc
Would you get into the mood to discuss further data processing possibilities?
A)
The originally specified SmPL disjunction is expanded by the Coccinelle software
so far.
It was indicated to perform a source code search for selected identifiers.
Would it be nicer to benefit any more from such a data restriction?
B)
The identifier selection was reversed for the construction of a grep command.
Can filter ordering matter any more for efficient text searches?
https://en.wikipedia.org/wiki/Short-circuit_evaluation
Regards,
Markus
reply other threads:[~2026-08-11 8:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=295006f6-067d-4d85-9604-c505db13cd5a@web.de \
--to=markus.elfring@web.de \
--cc=cocci@inria.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®