From: Markus Elfring <Markus.Elfring@web.de>
To: Zhao Feng <zhaofeng2@cmss.chinamobile.com>,
linux-phy@lists.infradead.org, Vinod Koul <vkoul@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Guangshuo Li <lgs201920130244@gmail.com>,
Johan Hovold <johan@kernel.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Miaoqian Lin <linmq006@gmail.com>
Subject: Re: [PATCH] phy: ti: omap-usb2: fix OF node leak at probe
Date: Wed, 18 Nov 2026 20:20:08 +0100 [thread overview]
Message-ID: <8f54d634-ba46-4433-a60d-3c995f15d57a@web.de> (raw)
In-Reply-To: <20261109072450.1005-1-zhaofeng2@cmss.chinamobile.com>
…
> Drop the node reference right after of_find_device_by_node(); the
> device reference taken by of_find_device_by_node() keeps the platform
> device alive and is released at unbind by the devm action registered
> below.
How do you think about to reduce also the scope for the corresponding local
variable “control_node”?
https://elixir.bootlin.com/linux/v7.4-rc1/source/drivers/phy/ti/phy-omap-usb2.c#L373-L515
Would you eventually like to increase the application of scope-based resource management?
https://elixir.bootlin.com/linux/v7.4-rc1/source/include/linux/of.h#L138
Regards,
Markus
next prev parent reply other threads:[~2026-11-18 19:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 7:24 Zhao Feng
2026-11-18 19:20 ` Markus Elfring [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-07-08 8:12 Guangshuo Li
2026-09-26 14:15 ` Manivannan Sadhasivam
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=8f54d634-ba46-4433-a60d-3c995f15d57a@web.de \
--to=markus.elfring@web.de \
--cc=johan@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgs201920130244@gmail.com \
--cc=linmq006@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=mani@kernel.org \
--cc=vkoul@kernel.org \
--cc=zhaofeng2@cmss.chinamobile.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®