All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Denis Efremov <efremov@linux.com>,
	Coccinelle <cocci@systeme.lip6.fr>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Julia Lawall <julia.lawall@lip6.fr>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Nicolas Palix <nicolas.palix@imag.fr>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] coccinelle: api: add kvfree script
Date: Sat, 6 Jun 2020 16:04:48 +0200	[thread overview]
Message-ID: <119d91fd-1ad0-8842-10eb-ee8fa16da1b0@web.de> (raw)

> +@choice@
> +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


> +@opportunity 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.


+@pkfree 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

WARNING: multiple messages have this Message-ID (diff)
From: Markus Elfring <Markus.Elfring@web.de>
To: Denis Efremov <efremov@linux.com>,
	Coccinelle <cocci@systeme.lip6.fr>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Julia Lawall <julia.lawall@lip6.fr>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Nicolas Palix <nicolas.palix@imag.fr>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] coccinelle: api: add kvfree script
Date: Sat, 06 Jun 2020 14:04:48 +0000	[thread overview]
Message-ID: <119d91fd-1ad0-8842-10eb-ee8fa16da1b0@web.de> (raw)
In-Reply-To: <99ed463c-b7ba-0400-7cf7-5bcc1992baef@web.de>

> +@choice@
> +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


> +@opportunity 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.


+@pkfree 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

WARNING: multiple messages have this Message-ID (diff)
From: Markus Elfring <Markus.Elfring@web.de>
To: Denis Efremov <efremov@linux.com>,
	Coccinelle <cocci@systeme.lip6.fr>,
	Gilles Muller <Gilles.Muller@lip6.fr>,
	Julia Lawall <julia.lawall@lip6.fr>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Michal Marek <michal.lkml@markovi.net>,
	Nicolas Palix <nicolas.palix@imag.fr>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Cocci] [PATCH] coccinelle: api: add kvfree script
Date: Sat, 6 Jun 2020 16:04:48 +0200	[thread overview]
Message-ID: <119d91fd-1ad0-8842-10eb-ee8fa16da1b0@web.de> (raw)

> +@choice@
> +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


> +@opportunity 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.


+@pkfree 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
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

             reply	other threads:[~2020-06-06 14:05 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-06 14:04 Markus Elfring [this message]
2020-06-06 14:04 ` [Cocci] [PATCH] coccinelle: api: add kvfree script Markus Elfring
2020-06-06 14:04 ` Markus Elfring
2020-06-06 14:39 ` Julia Lawall
2020-06-06 14:39   ` [Cocci] " Julia Lawall
2020-06-06 14:39   ` Julia Lawall
2020-06-06 15:10   ` Markus Elfring
2020-06-06 15:10     ` [Cocci] " Markus Elfring
2020-06-06 15:10     ` Markus Elfring
  -- strict thread matches above, loose matches on Subject: below --
2020-06-06  7:30 [PATCH] " Markus Elfring
2020-06-06  7:30 ` [Cocci] " Markus Elfring
2020-06-06  7:30 ` Markus Elfring
2020-06-06  7:46 ` Julia Lawall
2020-06-06  7:46   ` [Cocci] " Julia Lawall
2020-06-06  7:46   ` Julia Lawall
2020-06-06  9:50   ` Markus Elfring
2020-06-06  9:50     ` [Cocci] " Markus Elfring
2020-06-06  9:50     ` Markus Elfring
2020-06-07 14:02     ` Coccinelle: Extending capabilities for source file pre-selection Markus Elfring
2020-06-07 14:02       ` [Cocci] " Markus Elfring
2020-06-07 14:02       ` Markus Elfring
2020-06-06 11:06   ` coccinelle: api: add kvfree script Markus Elfring
2020-06-06 11:06     ` [Cocci] " Markus Elfring
2020-06-06 11:06     ` Markus Elfring
2020-06-06 11:11     ` Julia Lawall
2020-06-06 11:11       ` [Cocci] " Julia Lawall
2020-06-06 11:11       ` Julia Lawall
2020-06-06 11:21       ` Markus Elfring
2020-06-06 11:21         ` [Cocci] " Markus Elfring
2020-06-06 11:21         ` Markus Elfring
2020-06-07  6:42         ` Coccinelle: Improving software components around usage of SmPL disjunctions Markus Elfring
2020-06-07  6:42           ` [Cocci] " Markus Elfring
2020-06-07  6:42           ` Markus Elfring
2020-06-05 20:42 [PATCH] coccinelle: api: add kvfree script Denis Efremov

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=119d91fd-1ad0-8842-10eb-ee8fa16da1b0@web.de \
    --to=markus.elfring@web.de \
    --cc=Gilles.Muller@lip6.fr \
    --cc=cocci@systeme.lip6.fr \
    --cc=efremov@linux.com \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=nicolas.palix@imag.fr \
    --cc=yamada.masahiro@socionext.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.