cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@lip6.fr>, kernel-janitors@vger.kernel.org
Cc: Michal Marek <michal.lkml@markovi.net>,
	Nicolas Palix <nicolas.palix@imag.fr>,
	LKML <linux-kernel@vger.kernel.org>,
	Ding Xiang <dingxiang@cmss.chinamobile.com>,
	Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Coccinelle: Add a SmPL script for the reconsideration of redundant dev_err() calls
Date: Fri, 21 Jun 2019 11:37:22 +0200	[thread overview]
Message-ID: <452fc5f1-bcaa-c9a5-9600-0278594e5e6f@web.de> (raw)
In-Reply-To: <alpine.DEB.2.20.1906211119430.3740@hadrien>

> I still don't see the point of specifying return.  Why not just S, where S
> is a statement metavariable?

Do you find the following SmPL change specification more appropriate?

@deletion depends on patch@
expression e;
statement s;
@@
 e = devm_ioremap_resource(...);
 if (IS_ERR(e))
(
-{
-   dev_err(...);
    s
-}
|
 {
 <+...
-   dev_err(...);
 ...+>
 }
)


Will any additional constraints become relevant?


>> Would this approach need a version check for the Coccinelle software?
>
> Why would that be necessary?

I guess that the application of SmPL disjunctions for if statements
can trigger development concerns.

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

  parent reply	other threads:[~2019-06-21  9:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20 17:30 [Cocci] [PATCH] Coccinelle: Add a SmPL script for the reconsideration of redundant dev_err() calls Markus Elfring
2019-06-20 18:48 ` Julia Lawall
2019-06-20 19:02   ` [Cocci] " Markus Elfring
2019-06-20 19:02   ` Markus Elfring
2019-06-20 19:12     ` Julia Lawall
2019-06-20 19:34       ` Markus Elfring
2019-06-21  9:15       ` Markus Elfring
2019-06-21  9:21         ` Julia Lawall
2019-06-21  9:37           ` Markus Elfring
2019-06-21  9:37           ` Markus Elfring [this message]
2019-06-21 14:52             ` Julia Lawall
2019-07-01  8:10 ` [Cocci] [PATCH v2] " Markus Elfring
2019-07-01 10:48   ` Enrico Weigelt, metux IT consult
2019-07-01 12:40     ` [Cocci] [v2] Coccinelle: Suppression of warnings? Markus Elfring
2019-07-01 12:47     ` [Cocci] [PATCH v2] Coccinelle: Add a SmPL script for the reconsideration of redundant dev_err() calls Julia Lawall

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=452fc5f1-bcaa-c9a5-9600-0278594e5e6f@web.de \
    --to=markus.elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    --cc=dingxiang@cmss.chinamobile.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 \
    /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).