[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1902171246560.2444@hadrien>
Date: Sun, 17 Feb 2019 12:48:02 +0100 (CET)
From: Julia Lawall <julia.lawall@...6.fr>
To: Markus Elfring <Markus.Elfring@....de>
cc: Wen Yang <yellowriver2010@...mail.com>,
Gilles Muller <Gilles.Muller@...6.fr>,
Nicolas Palix <nicolas.palix@...g.fr>,
Michal Marek <michal.lkml@...kovi.net>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Wen Yang <wen.yang99@....com.cn>,
Cheng Shengyu <cheng.shengyu@....com.cn>,
kernel-janitors@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
Coccinelle <cocci@...teme.lip6.fr>
Subject: Re: [PATCH v6] coccinelle: semantic code search for missing
put_device()
On Sun, 17 Feb 2019, Markus Elfring wrote:
> >>> +@...rch exists@
> >>> +local idexpression id;
> >>> +expression x,e,e1;
> >>> +position p1,p2;
> >>> +type T,T1,T2;
> >>> +@@
> >>> +
> >>> +id = of_find_device_by_node@p1(x)
> >>> +... when != e = id
> >>
> >> I suggest to increase your software development attention also for
> >> another implementation detail.
> >> Source code analysis triggers challenges for safe data flow handling.
> >> the semantic patch language supports search specifications for
> >> the exclusion of specific assignments.
> >>
> >> Does this SmPL code contain a questionable order for the source
> >> and target metavariables?
> >> Can the following variant be more appropriate?
> >>
> >> + ... when != id = e
> >
> > This is possible, but I think unlikely.
>
> Would you dare to interpret my update suggestion (reordering of two identifiers)
> as a required SmPL script correction?
I didn't suggest to reorder anything. Both are needed.
And, no I don't consider it to be a required suggestion. In practice,
reassigning such a variable is very unlikely.
julia
Powered by blists - more mailing lists