From: Markus Elfring <Markus.Elfring@web.de>
To: cocci@inria.fr
Subject: [cocci] Avoiding metavariable confusion for duplicate identifiers?
Date: Sat, 28 Jun 2025 16:11:20 +0200 [thread overview]
Message-ID: <2038c080-a429-44bb-a572-c1f9e733320d@web.de> (raw)
Hello,
I imagine that a known function definition can be converted into a source code
transformation like the following.
https://elixir.bootlin.com/linux/v6.16-rc3/source/include/uapi/linux/cec.h#L84-L90
Another SmPL script example:
@replacement@
@@
-msg -> msg [ 0 ] & 0xf
+cec_msg_destination(msg)
Now I wonder which metavariable selections would be appropriate for such
an use case.
Regards,
Markus
next reply other threads:[~2025-06-28 14:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-28 14:11 Markus Elfring [this message]
2025-06-28 14:39 ` [cocci] Avoiding metavariable confusion for duplicate identifiers? Julia Lawall
2025-06-28 19:21 ` Markus Elfring
2025-06-28 19:32 ` Julia Lawall
2025-06-28 19:37 ` Markus Elfring
2025-06-28 19:43 ` Julia Lawall
2025-06-28 19:50 ` Markus Elfring
2025-06-28 19:58 ` Julia Lawall
2025-06-28 20:08 ` Markus Elfring
2025-06-28 20:44 ` Markus Elfring
2025-06-28 21:21 ` Julia Lawall
2025-06-29 5:30 ` Markus Elfring
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=2038c080-a429-44bb-a572-c1f9e733320d@web.de \
--to=markus.elfring@web.de \
--cc=cocci@inria.fr \
/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).