All of lore.kernel.org
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Easy search for elements besides binary operators with SmPL
Date: Fri, 12 May 2017 15:09:00 +0200	[thread overview]
Message-ID: <45237ab7-f7ba-07dd-e492-dc5ce330364e@users.sourceforge.net> (raw)

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

             reply	other threads:[~2017-05-12 13:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 13:09 SF Markus Elfring [this message]
     [not found] ` <alpine.DEB.2.20.1705122137090.3416@hadrien>
2017-05-12 14:42   ` [Cocci] Easy search for elements besides binary operators with SmPL 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

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=45237ab7-f7ba-07dd-e492-dc5ce330364e@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --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.