mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yige Jiang <yigejiang86@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org,
	Bartosz Golaszewski <brgl@kernel.org>,
	WenTao Liang <vulab@iscas.ac.cn>
Subject: Re: [PATCH v2] regulator: as3722: use the platform OF node setter
Date: Mon, 9 Nov 2026 00:49:35 +0800	[thread overview]
Message-ID: <4C416D7B-2D4C-402D-9C60-97069D0DC8BB@gmail.com> (raw)
In-Reply-To: <179406780591.3424803.16395424488807885604.b4-review@b4>

Hi Mark,

You're right, sorry. I overlooked the fw_devlink implications here.
I reproduced a probe retry/rebind failure in a controlled QEMU test
with the actual driver.

Please drop v2. I have a draft of an alternative fix that I believe
would address the reference leak without changing the platform
device's node during probe. I'd be happy to post it separately as
v3 if that would be helpful.

I also noticed the same probe-time assignment in the applied CPCAP
patch and will follow up on that separately.

Thanks,
Yige
> On Nov 8, 2026, at 12:10 AM, Mark Brown <broonie@kernel.org> wrote:
> 
>> Use platform_device_set_of_node() to synchronize both fields and
>> give the device its own reference. Use __free(device_node) to release
> 
>> static int as3722_get_regulator_dt_data(struct platform_device *pdev,
>> 		struct as3722_regulators *as3722_regs)
>> {
> 
>> -	pdev->dev.of_node = np;
>> +	platform_device_set_of_node(pdev, np);
> 
> Are you sure this is safe to use during probe(), which must of necessity
> happen after platform_device_add()?  In particular with the interactions
> with fw_devlink.
> 
> -- 
> Mark Brown <broonie@kernel.org>


      reply	other threads:[~2026-11-08 16:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 18:09 [PATCH] " Yige Jiang
2026-11-05  9:00 ` Bartosz Golaszewski
2026-11-05 10:03   ` [PATCH v2] " Yige Jiang
2026-11-05 11:20     ` Mark Brown
2026-11-05 14:04     ` Bartosz Golaszewski
2026-11-07 16:10     ` Mark Brown
2026-11-08 16:49       ` Yige Jiang [this message]

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=4C416D7B-2D4C-402D-9C60-97069D0DC8BB@gmail.com \
    --to=yigejiang86@gmail.com \
    --cc=brgl@kernel.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    /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®