From: Markus Elfring <Markus.Elfring@web.de>
To: Wen Yang <wen.yang99@zte.com.cn>
Cc: Gilles Muller <Gilles.Muller@lip6.fr>,
Julia Lawall <julia.lawall@lip6.fr>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Michal Marek <michal.lkml@markovi.net>,
Nicolas Palix <nicolas.palix@imag.fr>,
Wen Yang <yellowriver2010@hotmail.com>,
Xue Zhihong <xue.zhihong@zte.com.cn>,
Yi Wang <wang.yi59@zte.com.cn>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [PATCH v3] Coccinelle: semantic patch for missing put_device()
Date: Wed, 13 Feb 2019 19:29:20 +0100 [thread overview]
Message-ID: <c10e0bf1-4830-7ee4-5b21-70b521dd6c36@web.de> (raw)
In-Reply-To: <1550039015-5587-1-git-send-email-wen.yang99@zte.com.cn>
> The of_find_device_by_node() takes a reference to the underlying device
> structure, we should release that reference.
I have got another concern for further software development considerations.
How do you think about to describe here if it can be determined
by source code analysis that the desired release should be performed
only in the same function implementation (or not)?
How much does this aspect influence the source code search confidence?
> + when != e1 = (T)id
> + when != e2 = &id->dev
> + when != e3 = get_device(&id->dev)
> + when != e4 = (T1)platform_get_drvdata(id)
I have got another idea for a bit of software fine-tuning at such a place.
I am unsure if it can become relevant to reduce the number of metavariables
here by introducing a SmPL disjunction.
+ when != ex = \( (T)id \| &id->dev \| get_device(&id->dev) \| (T1)platform_get_drvdata(id) \)
Regards,
Markus
next prev parent reply other threads:[~2019-02-13 18:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-13 6:23 [PATCH v3] coccinelle: " Wen Yang
2019-02-13 15:40 ` Markus Elfring
2019-02-13 18:29 ` Markus Elfring [this message]
2019-02-13 19:52 ` [PATCH v3] Coccinelle: " Julia Lawall
2019-02-14 8:13 ` [v3] " 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=c10e0bf1-4830-7ee4-5b21-70b521dd6c36@web.de \
--to=markus.elfring@web.de \
--cc=Gilles.Muller@lip6.fr \
--cc=cocci@systeme.lip6.fr \
--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 \
--cc=wang.yi59@zte.com.cn \
--cc=wen.yang99@zte.com.cn \
--cc=xue.zhihong@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®