* Restricting SmPL disjunctions for identifier selections?
@ 2026-08-11 8:15 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2026-08-11 8:15 UTC (permalink / raw)
To: cocci; +Cc: LKML, kernel-janitors
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-11 8:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-11 8:15 Restricting SmPL disjunctions for identifier selections? Markus Elfring
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®