All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cocci] Easy search for elements besides binary operators with SmPL
@ 2017-05-12 13:09 SF Markus Elfring
       [not found] ` <alpine.DEB.2.20.1705122137090.3416@hadrien>
  0 siblings, 1 reply; 6+ messages in thread
From: SF Markus Elfring @ 2017-05-12 13:09 UTC (permalink / raw)
  To: cocci

Hello,

I would like to check also the application of elements which are used together
with binary operators like the following.


@find@
expression target;
identifier action;
@@
 target = action(...,
                 ...
*                | __GFP_NOFAIL
                 | ...,
                 ...);


elfring at Sonne:~/Projekte/Linux/next-patched> spatch.opt drivers/md/dm-region-hash.c ~/Projekte/Coccinelle/janitor/show_use_of_nofail1.cocci
?
minus: parse error: 
  File "/home/elfring/Projekte/Coccinelle/janitor/show_use_of_nofail1.cocci", line 6, column 17, charpos = 87
  around = '...',
  whole content =                  ...


How should I improve my search pattern?


A metavariable can already be used for the search of a function parameter at an
undetermined position within a bigger list. Can similar functionality work also
for binary operators?

Regards,
Markus

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

end of thread, other threads:[~2017-05-12 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-12 13:09 [Cocci] Easy search for elements besides binary operators with SmPL SF Markus Elfring
     [not found] ` <alpine.DEB.2.20.1705122137090.3416@hadrien>
2017-05-12 14:42   ` SF Markus Elfring
2017-05-12 14:49     ` Julia Lawall
2017-05-12 15:02       ` SF Markus Elfring
2017-05-12 15:15         ` Julia Lawall
2017-05-12 15:38           ` 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.