[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 6 Jun 2020 16:04:48 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Denis Efremov <efremov@...ux.com>,
Coccinelle <cocci@...teme.lip6.fr>,
Gilles Muller <Gilles.Muller@...6.fr>,
Julia Lawall <julia.lawall@...6.fr>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
Nicolas Palix <nicolas.palix@...g.fr>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] coccinelle: api: add kvfree script
> +@...ice@
> +expression E, E1;
> +position kok, vok;
> +@@
> +
> +(
> + if (...) {
> + ...
> + E = \(kmalloc@kok\|…\)(...)
Further implementation details from this SmPL script caught my software
development attention.
* Is there a need to add the specification “when any” to the SmPL ellipses
before such assignment statements?
* A limited search approach was expressed. Will additional source code variations
become relevant?
+ switch statement
+ if branches with single statements
+ conditional operator
> +@...ortunity depends on !patch …@
…
> + E = \(kmalloc\|…\)(..., size, ...)
> + ... when != E = E1
> + when != size = E1
I wonder that two assignments should be excluded here according to
the same expression metavariable.
+@...ree depends on patch exists@
…
+- \(kfree\|kvfree\)(E)
++ vfree(E)
Would you like to use a SmPL code variant like the following
at any more places?
(Is it occasionally helpful to increase the change precision?)
+-\(kfree\|kvfree\)
++vfree
+ (E)
Regards,
Markus
Powered by blists - more mailing lists