cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] xusb-tegra186: Adding a function call behind a label with SmPL?
Date: Wed, 30 Oct 2019 21:44:30 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1910302144050.3273@hadrien> (raw)
In-Reply-To: <3389d97e-37a6-e755-bfb6-73b98cfd5bca@web.de>

[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]



On Wed, 30 Oct 2019, Markus Elfring wrote:

> > There is no reason why a patch should be generated in this case.
> > As you should know well, A ... B only matches in a transformation case
> > if every path from A leads to code matching B.  That is not the case in your example.
>
> The exception handling code should usually be executed at the end of
> function implementations after an error situation was detected.
>
> Do you try to refer to specific information from the software documentation
> like the following?
>
> https://github.com/coccinelle/coccinelle/blob/ed1eb8e06f800739d3992158d36945c0c4c6f0c7/docs/manual/cocci_syntax.tex#L179
> “…
> A depends on clause can further indicate whether the clause should be satisfied
> for all the branches (forall) or only for one (exists). exists is the default.
> …”

There is no depends on in your code.  The cited text is not relevant.

julia

>
> The following simple transformation approach seems to work in the way
> which I expected somehow initially.
>
> @addition exists@
> expression object;
> @@
>  object = kzalloc(...)
>  ... when any
>  device_unregister(...);
>  out:
> +kfree(object);
>  return ERR_PTR(...);
>
>
> Does this change specification indicate then a disagreement about
> a default SmPL rule property?
>
> Regards,
> Markus
>

[-- Attachment #2: Type: text/plain, Size: 136 bytes --]

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

  reply	other threads:[~2019-10-30 20:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fe6868a4-01f5-2832-9081-7643be0ab4a1@web.de>
2019-10-29  9:40 ` [Cocci] phy: tegra: xusb: Complete exception handling in probe functions Markus Elfring
2019-10-30 10:44   ` [Cocci] drivers/phy/tegra: Completion for exception handling in probe functions with SmPL? Markus Elfring
2019-10-30 17:30     ` [Cocci] xusb-tegra186: Renaming known jump labels " Markus Elfring
2019-10-30 18:15     ` [Cocci] xusb-tegra186: Adding a function call behind a label " Markus Elfring
     [not found]       ` <2db8691d768571f6c275f3d89401df23@lip6.fr>
2019-10-30 20:00         ` Markus Elfring
2019-10-30 20:44           ` Julia Lawall [this message]
2019-10-31  8:12         ` Markus Elfring
2019-10-30 20:50     ` [Cocci] drivers/phy/tegra: Completion for exception handling in probe functions " Markus Elfring

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=alpine.DEB.2.21.1910302144050.3273@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    /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 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).