From: waldemar.rymarkiewicz@gmail.com (Waldemar Rymarkiewicz)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Match #define in cocci
Date: Wed, 14 Sep 2016 15:31:15 +0200 [thread overview]
Message-ID: <CAHKzcEN9fcOk1HCar=u+htx=o61xF61VmbO9PeYPBaedTQYDcg@mail.gmail.com> (raw)
Hi,
I'm new to cocci and try to understand how all this things work. I
have a problem with matching a #define in a patch.
I wan to match local definition
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
and add #undef it first. The output should be like this
#undef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
I tried many approaches but seems like parser have a problem with
parsing #defines.
Is that possible to achieve what I expect in cocci ?
Cheers
/Waldek
next reply other threads:[~2016-09-14 13:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 13:31 Waldemar Rymarkiewicz [this message]
2016-09-14 14:16 ` [Cocci] Match #define in cocci Julia Lawall
2016-09-15 5:57 ` Waldemar Rymarkiewicz
2016-09-15 6:03 ` Julia Lawall
2016-09-15 6:41 ` Waldemar Rymarkiewicz
2016-09-15 7:44 ` Waldemar Rymarkiewicz
2016-09-15 7:59 ` Julia Lawall
2016-09-15 8:11 ` [Cocci] Match #define with SmPL SF Markus Elfring
2016-09-20 12:38 ` Waldemar Rymarkiewicz
2016-09-20 18:20 ` SF 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='CAHKzcEN9fcOk1HCar=u+htx=o61xF61VmbO9PeYPBaedTQYDcg@mail.gmail.com' \
--to=waldemar.rymarkiewicz@gmail.com \
--cc=cocci@systeme.lip6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.