All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] Match #define in cocci
@ 2016-09-14 13:31 Waldemar Rymarkiewicz
  2016-09-14 14:16 ` Julia Lawall
  0 siblings, 1 reply; 10+ messages in thread
From: Waldemar Rymarkiewicz @ 2016-09-14 13:31 UTC (permalink / raw)
  To: cocci

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-09-20 18:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 13:31 [Cocci] Match #define in cocci Waldemar Rymarkiewicz
2016-09-14 14:16 ` 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

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.