cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] Coccinelle: pci_free_consistent: Checking when constraints
@ 2019-09-08  8:10 Markus Elfring
  2019-09-08  8:23 ` Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Elfring @ 2019-09-08  8:10 UTC (permalink / raw)
  To: Coccinelle, Gilles Muller, Julia Lawall, Masahiro Yamada,
	Michal Marek, Nicolas Palix, Petr Strnad, Wen Yang
  Cc: Kate Stewart, Yi Wang, Greg Kroah-Hartman, LKML, Thomas Gleixner,
	Allison Randal

Hello,

I have taken another look at a known script for the semantic patch language.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccinelle/free/pci_free_consistent.cocci?id=950b07c14e8c59444e2359f15fd70ed5112e11a0#n2

The following SmPL code is used there so far.

…
... when != pci_free_consistent(x,y,id,z)
    when != if (id) { ... pci_free_consistent(x,y,id,z) ... }
    when != if (y) { ... pci_free_consistent(x,y,id,z) ... }
…


It is specified that a specific function call should be excluded
in a source code search.
I do not see a need to repeat the specification twice that such a call
could eventually happen also within a branch of another if statement.
How do you think about to omit possibly redundant SmPL code at this place?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

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

end of thread, other threads:[~2019-09-16  6:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-08  8:10 [Cocci] Coccinelle: pci_free_consistent: Checking when constraints Markus Elfring
2019-09-08  8:23 ` Julia Lawall
2019-09-08 12:48   ` Markus Elfring
     [not found]     ` <alpine.DEB.2.21.1909082149100.2644@hadrien>
2019-09-09 10:40       ` Markus Elfring
2019-09-16  6:24       ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).