From: Julia Lawall <julia.lawall@lip6.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Yi Wang <wang.yi59@zte.com.cn>,
Michal Marek <michal.lkml@markovi.net>,
Nicolas Palix <nicolas.palix@imag.fr>,
linux-kernel@vger.kernel.org, Wen Yang <wen.yang99@zte.com.cn>,
cocci@systeme.lip6.fr
Subject: Re: [Cocci] [4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses
Date: Tue, 14 May 2019 08:52:54 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1905140849570.2567@hadrien> (raw)
In-Reply-To: <4116e083-9e21-62d7-10b7-5cb26594144c@web.de>
On Tue, 14 May 2019, Markus Elfring wrote:
> >> A SmPL ellipsis was specified for a search approach so that additional
> >> source code would be tolerated between an assignment to a local variable
> >> and the corresponding null pointer check.
> >>
> >> But such code should be restricted.
> >> * The local variable must not be reassigned there.
> >> * It must also not be forwarded to an other assignment target.
> >>
> >> Take additional casts for these code exclusion specifications into account
> >> together with optional parentheses.
> >
> > NACK.
>
> Can you agree to any information which I presented in the commit message?
>
>
> > You don't need so many type metavariables.
>
> It seems that the Coccinelle software can cope also with my SmPL code addition.
> You might feel uncomfortable with the suggested changes for a while.
It's ugly. Much more ugly than msg =
>
>
> > Type metavariables in the same ... can be the same.
>
> Such information is good to know for the proper usage of specifications
> after a SmPL ellipsis.
>
> * Can it become required to identify involved source code placeholders
> by extra metavariables?
I don't understand the question.
> * Would you like to clarify the probability any more how often the shown
> type casts will be identical?
No idea about this one either.
Basically, if you have T && T, the two T's have to be the same, and T is
not pure. If you have T || T, then only one will be matched and T remains
pure. If you have T on two separate ...s then you are in the && case. If
you have T in two branches of a disjunction or in two whens on the same
... you are in the || case. Just as you can use the variable e1 over and
over on the same when, you can use the same T.
julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
next prev parent reply other threads:[~2019-05-14 6:53 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-23 6:14 [Cocci] [PATCH] coccinelle: put_device: reduce false positives Wen Yang
2019-03-23 13:41 ` Julia Lawall
2019-03-23 19:44 ` Markus Elfring
2019-03-23 20:06 ` Julia Lawall
2019-03-26 8:45 ` Dan Carpenter
2019-03-26 9:38 ` Julia Lawall
2019-03-26 10:11 ` Dan Carpenter
2019-03-26 10:15 ` Julia Lawall
2019-03-28 13:08 ` Masahiro Yamada
2019-03-28 14:19 ` Julia Lawall
2019-04-01 6:44 ` [Cocci] Coccinelle: " Markus Elfring
2019-04-01 20:04 ` Julia Lawall
2019-05-13 8:55 ` [Cocci] [PATCH 0/5] Coccinelle: put_device: Adjustments for a SmPL script Markus Elfring
2019-05-13 8:59 ` [Cocci] [PATCH 1/5] Coccinelle: put_device: Adjust a message construction Markus Elfring
2019-05-13 9:35 ` Julia Lawall
2019-05-13 11:33 ` [Cocci] [1/5] " Markus Elfring
2019-05-13 11:36 ` Julia Lawall
2019-05-13 12:48 ` Markus Elfring
2019-07-06 13:13 ` [Cocci] [PATCH 1/5] " Masahiro Yamada
2019-05-13 9:01 ` [Cocci] [PATCH 2/5] Coccinelle: put_device: Add a cast to an expression for an assignment Markus Elfring
2019-05-13 9:33 ` Julia Lawall
2019-07-06 13:13 ` Masahiro Yamada
2019-05-13 9:05 ` [Cocci] [PATCH 3/5] Coccinelle: put_device: Merge four SmPL when constraints into one Markus Elfring
2019-05-13 9:32 ` Julia Lawall
2019-05-13 11:48 ` [Cocci] [3/5] " Markus Elfring
2019-05-13 11:48 ` Markus Elfring
2019-05-13 11:51 ` Julia Lawall
2019-05-13 12:52 ` Markus Elfring
2019-05-13 9:07 ` [Cocci] [PATCH 4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses Markus Elfring
2019-05-13 9:31 ` Julia Lawall
2019-05-13 12:22 ` [Cocci] [4/5] " Markus Elfring
2019-05-14 5:55 ` Markus Elfring
2019-05-14 6:52 ` Julia Lawall [this message]
2019-05-14 7:49 ` Markus Elfring
2019-05-14 9:18 ` [Cocci] [4/5] Coccinelle: put_device: Extend when constraints for twoSmPL ellipses wen.yang99
2019-05-14 9:51 ` Markus Elfring
2019-05-14 7:49 ` [Cocci] [4/5] Coccinelle: put_device: Extend when constraints for two SmPL ellipses Markus Elfring
2019-05-13 9:07 ` [Cocci] [PATCH 4/5] " Markus Elfring
2019-05-13 9:10 ` [Cocci] [PATCH 5/5] Coccinelle: put_device: Merge two SmPL when constraints into one Markus Elfring
2019-05-13 9:30 ` Julia Lawall
2019-05-13 12:35 ` [Cocci] [5/5] " 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.1905140849570.2567@hadrien \
--to=julia.lawall@lip6.fr \
--cc=Markus.Elfring@web.de \
--cc=cocci@systeme.lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nicolas.palix@imag.fr \
--cc=wang.yi59@zte.com.cn \
--cc=wen.yang99@zte.com.cn \
/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).