From: Julia Lawall <julia.lawall@lip6.fr>
To: wen.yang99@zte.com.cn
Cc: julia.lawall@lip6.fr, markus.elfring@web.de,
Gilles.Muller@lip6.fr, nicolas.palix@imag.fr,
michal.lkml@markovi.net, wang.yi59@zte.com.cn,
yamada.masahiro@socionext.com, yellowriver2010@hotmail.com,
cheng.shengyu@zte.com.cn, cocci@systeme.lip6.fr,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v4] coccinelle: semantic patch for missing put_device()
Date: Fri, 15 Feb 2019 07:55:14 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.21.1902150754380.2896@hadrien> (raw)
In-Reply-To: <201902151452197117145@zte.com.cn>
On Fri, 15 Feb 2019, wen.yang99@zte.com.cn wrote:
> Hi Julia, thank you very much.
>
> > > >> In a function, for variables returned by calling of_find_device_by_node(),
> > > > Do variables really get returned?
> > > > The provided pointer should usually be stored somewhere.
> > >
> > > Thank you very much, we will consider this situation and submit a next version to fix it.
> >
> > I don't know what Markus is talking about here, so I'm not sure that a
> > change is needed.
>
> I think Markus means that we need to deal with two situations:
> 1, The return value of of_find_device_by_node () is assigned to a variable, such as:
> pdev = of_find_device_by_node(np);
> 2, The return value of of_find_device_by_node() is assigned to a variable in a structure, such as:
> dev->pdev = of_find_device_by_node(args.np);
>
> So I plan to modify the following to capture both cases:
> -local idexpression id;
> +expression id;
I'm not sure that this is a good idea. There is likely no need for a put
in the latter case.
julia
> ...
> id = of_find_device_by_node@p1(x)
>
> > > >> + "ERROR: missing put_device;"
> > > >Will change confidence considerations result in another fine-tuning for this message?
> > >
> > > Thank you, we will change "ERROR" to "WARNING".
> >
> > I think ERROR is fine. If it is a real positive than it is a real
> > problem. Warning is for things that look ugly, but don't have any impact
> > on the execution.
>
> OK, I will keep it.
> Thanks.
>
> Regards,
> Wen
next parent reply other threads:[~2019-02-15 6:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201902151452197117145@zte.com.cn>
2019-02-15 6:55 ` Julia Lawall [this message]
2019-02-15 7:50 ` [v4] " Markus Elfring
2019-02-15 8:02 ` Julia Lawall
2019-02-15 8:19 ` Markus Elfring
[not found] <201902151422261425412@zte.com.cn>
2019-02-15 6:25 ` [PATCH v4] " Julia Lawall
2019-02-14 6:38 Wen Yang
2019-02-14 10:01 ` 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.1902150754380.2896@hadrien \
--to=julia.lawall@lip6.fr \
--cc=Gilles.Muller@lip6.fr \
--cc=cheng.shengyu@zte.com.cn \
--cc=cocci@systeme.lip6.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.elfring@web.de \
--cc=michal.lkml@markovi.net \
--cc=nicolas.palix@imag.fr \
--cc=wang.yi59@zte.com.cn \
--cc=wen.yang99@zte.com.cn \
--cc=yamada.masahiro@socionext.com \
--cc=yellowriver2010@hotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®