mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: maudspierings@gocontroll.com,
	Sascha Hauer <s.hauer@pengutronix.de>,
	BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH] pmdomain: fix collision in names when registering
Date: Tue, 16 Dec 2025 11:35:11 +0100	[thread overview]
Message-ID: <f54c14fa-25ee-448e-b94f-50d4190e12f5@pengutronix.de> (raw)
In-Reply-To: <20251216-genpd_fix-v1-1-b4ca268d3b31@gocontroll.com>

Hello Maud,

On 12/16/25 11:24 AM, Maud Spierings via B4 Relay wrote:
> From: Maud Spierings <maudspierings@gocontroll.com>
> 
> After adding the imx8m-blk-ctrl driver errors started appearing about
> the genpd device already being registered.
> 
> incorperate some extra device details in the device name so this
> possible collision goes away.
> 
> Signed-off-by: Maud Spierings <maudspierings@gocontroll.com>

Thanks for your patch. Did you check what the device is called now?

Do we need to change virt_dev->id = DEVICE_ID_SINGLE; just after the
context to get rid of a trailing 0?

Cheers,
Ahmad

> ---
> It wasn't just errors, it started crashing but that is a seperate issue.
> It at least loads normally with this change
> ---
>  drivers/base/power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/power.c b/drivers/base/power.c
> index c71389422a..af06f984c0 100644
> --- a/drivers/base/power.c
> +++ b/drivers/base/power.c
> @@ -506,7 +506,7 @@ struct device *genpd_dev_pm_attach_by_id(struct device *dev,
>  	if (!virt_dev)
>  		return ERR_PTR(-ENOMEM);
>  
> -	dev_set_name(virt_dev, "genpd");
> +	dev_set_name(virt_dev, "genpd:%u:%s", index, dev_name(dev));
>  	virt_dev->bus = &genpd_bus_type;
>  	virt_dev->parent = dev;
>  	virt_dev->of_node = dev->of_node;
> 
> ---
> base-commit: 63898c48611dfe51409ff1f4e1c30de4b2737c48
> change-id: 20251216-genpd_fix-0f1ed7d8cbb2
> 
> Best regards,

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




  reply	other threads:[~2025-12-16 11:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-16 10:24 Maud Spierings via B4 Relay
2025-12-16 10:35 ` Ahmad Fatoum [this message]
2025-12-16 10:39   ` Maud Spierings
2025-12-16 10:43     ` Ahmad Fatoum

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=f54c14fa-25ee-448e-b94f-50d4190e12f5@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=maudspierings@gocontroll.com \
    --cc=s.hauer@pengutronix.de \
    /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