mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 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: LKML, Allison Randal, Enrico Weigelt, Greg Kroah-Hartman,
	Kate Stewart, Thomas Gleixner, Yi Wang

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

^ 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 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

all inboxes | Powered by JetHome®