public inbox for cocci@systeme.lip6.fr
 help / color / mirror / Atom feed
* [Cocci]  [Review needed] Ensure that calls to d_find_alias() are followed by dput().
@ 2012-11-08  1:29 Cyril Roelandt
  0 siblings, 0 replies; 7+ messages in thread
From: Cyril Roelandt @ 2012-11-08  1:29 UTC (permalink / raw)
  To: cocci

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)

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Cocci] [Review needed] Ensure that calls to d_find_alias() are followed by dput().
@ 2012-11-08  1:31 Cyril Roelandt
  2012-11-08  7:21 ` Julia Lawall
  0 siblings, 1 reply; 7+ messages in thread
From: Cyril Roelandt @ 2012-11-08  1:31 UTC (permalink / raw)
  To: cocci

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/715def61/attachment.ksh>

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

end of thread, other threads:[~2012-11-21 23:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08  1:29 [Cocci] [Review needed] Ensure that calls to d_find_alias() are followed by dput() Cyril Roelandt
  -- strict thread matches above, loose matches on Subject: below --
2012-11-08  1:31 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox