linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	"Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: "robh+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"frowand.list@gmail.com" <frowand.list@gmail.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] of/platform: increase refcount of fwnode
Date: Thu, 17 Aug 2023 13:13:01 +0000	[thread overview]
Message-ID: <DU0PR04MB9417B3FE767FA06FFFEE018A881AA@DU0PR04MB9417.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <ZN3+XzfK00vXPiHO@smile.fi.intel.com>

> Subject: Re: [PATCH] of/platform: increase refcount of fwnode
> 
> On Thu, Aug 17, 2023 at 01:57:39PM +0300, Andy Shevchenko wrote:
> > On Sat, Aug 12, 2023 at 08:24:11PM +0800, Peng Fan (OSS) wrote:
> 
> ...
> 
> > > -	device_set_node(&dev->dev, of_fwnode_handle(node));
> > > +	device_set_node(&dev->dev, fwnode_handle_get(fwnode));
> >
> > Ditto.
> 
> Actually no, amba_device_alloc() does not use platform_device_alloc() and
> defines it's own .release method. There is no reference count drop there
> AFAICS.

My test only covers platform device, so ..

But I have a general question here. Since of_amba_device_create will use
the of_node or fwnode, shouldn't the refcount_t be increased and released
in amba device release?

Thanks,
Peng.

> 
> --
> With Best Regards,
> Andy Shevchenko
> 


  reply	other threads:[~2023-08-17 13:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-12 12:24 [PATCH] of/platform: increase refcount of fwnode Peng Fan (OSS)
2023-08-15  6:45 ` Andy Shevchenko
2023-08-17  1:18   ` Peng Fan
2023-08-17 10:57 ` Andy Shevchenko
2023-08-17 11:02   ` Andy Shevchenko
2023-08-17 13:13     ` Peng Fan [this message]
2023-08-17 14:06       ` Andy Shevchenko

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=DU0PR04MB9417B3FE767FA06FFFEE018A881AA@DU0PR04MB9417.eurprd04.prod.outlook.com \
    --to=peng.fan@nxp.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peng.fan@oss.nxp.com \
    --cc=robh+dt@kernel.org \
    /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).