From: tipecaml@gmail.com (Cyril Roelandt)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [Review needed] Ensure that calls to d_find_alias() are followed by dput().
Date: Thu, 08 Nov 2012 02:29:17 +0100 [thread overview]
Message-ID: <509B0AED.6050208@gmail.com> (raw)
Hello,
After seeing this patch
http://permalink.gmane.org/gmane.linux.kernel.commits.head/348204 I
tried to write a semantic patch that ensures that a call to
d_find_alias() is followed by a call to dput().
The attached patch seems to do that. I wrote it by copying the example
found in the "Reference counter: the of_xxx API" paragraph of the
grammar. I haven't played with Coccinelle in a while though, and I can't
remember exactly the semantics of the "exists" keyword and of the "<...
...>" and "<+... ...+>". Could you enlighten me ?
If the patch looks good to you, I'll send it to kernel-janitors (unless
there is a more approriate list for semantic patches) along with a few
patches.
WBR,
Cyril Roelandt.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: d_find_alias.cocci
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20121108/62a6d448/attachment.ksh>
-------------- next part --------------
_______________________________________________
Cocci mailing list
Cocci at diku.dk
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)
next reply other threads:[~2012-11-08 1:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 1:29 Cyril Roelandt [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-11-08 1:31 [Cocci] [Review needed] Ensure that calls to d_find_alias() are followed by dput() Cyril Roelandt
2012-11-08 7:21 ` Julia Lawall
2012-11-08 20:09 ` Cyril Roelandt
2012-11-09 11:12 ` Peter Senna Tschudin
2012-11-09 21:29 ` Julia Lawall
2012-11-21 23:51 ` Cyril Roelandt
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=509B0AED.6050208@gmail.com \
--to=tipecaml@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox