All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Marek Vasut <marex@denx.de>
Cc: linux-arm-kernel@lists.infradead.org, Marek Vasut <marex@denx.de>,
	Lucas Stach <l.stach@pengutronix.de>,
	Martyn Welch <martyn.welch@collabora.com>,
	Paul Elder <paul.elder@ideasonboard.com>,
	Shawn Guo <shawnguo@kernel.org>
Subject: Re: (EXT) [PATCH] soc: imx: imx8m-blk-ctrl: Make error prints useful
Date: Mon, 27 Jun 2022 08:08:39 +0200	[thread overview]
Message-ID: <12006796.O9o76ZdvQC@steina-w> (raw)
In-Reply-To: <20220624182939.162298-1-marex@denx.de>

Am Freitag, 24. Juni 2022, 20:29:39 CEST schrieb Marek Vasut:
> Print the name of the power domain which failed to make the error
> prints actually useful for finding the error.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alexander Stein <alexander.stein@ew.tq-group.com>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Martyn Welch <martyn.welch@collabora.com>
> Cc: Paul Elder <paul.elder@ideasonboard.com>
> Cc: Shawn Guo <shawnguo@kernel.org>
> ---
>  drivers/soc/imx/imx8m-blk-ctrl.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

I did something similar locally. Especially the 1st two hunks are pretty 
useful.

Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com>

> diff --git a/drivers/soc/imx/imx8m-blk-ctrl.c
> b/drivers/soc/imx/imx8m-blk-ctrl.c index 7ebc28709e945..dff7529268e4d
> 100644
> --- a/drivers/soc/imx/imx8m-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8m-blk-ctrl.c
> @@ -216,7 +216,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device
> *pdev) bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
>  	if (IS_ERR(bc->bus_power_dev))
>  		return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
> -				     "failed to attach power 
domain\n");
> +				     "failed to attach power 
domain \"bus\"\n");
> 
>  	for (i = 0; i < bc_data->num_domains; i++) {
>  		const struct imx8m_blk_ctrl_domain_data *data = 
&bc_data->domains[i];
> @@ -238,7 +238,8 @@ static int imx8m_blk_ctrl_probe(struct platform_device
> *pdev) dev_pm_domain_attach_by_name(dev, data->gpc_name);
>  		if (IS_ERR(domain->power_dev)) {
>  			dev_err_probe(dev, PTR_ERR(domain-
>power_dev),
> -				      "failed to attach power 
domain\n");
> +				      "failed to attach power 
domain \"%s\"\n",
> +				      data->gpc_name);
>  			ret = PTR_ERR(domain->power_dev);
>  			goto cleanup_pds;
>  		}
> @@ -251,7 +252,9 @@ static int imx8m_blk_ctrl_probe(struct platform_device
> *pdev)
> 
>  		ret = pm_genpd_init(&domain->genpd, NULL, true);
>  		if (ret) {
> -			dev_err_probe(dev, ret, "failed to init power 
domain\n");
> +			dev_err_probe(dev, ret,
> +				      "failed to init power domain 
\"%s\"\n",
> +				      data->gpc_name);
>  			dev_pm_domain_detach(domain->power_dev, 
true);
>  			goto cleanup_pds;
>  		}





_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-06-27  6:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 18:29 [PATCH] soc: imx: imx8m-blk-ctrl: Make error prints useful Marek Vasut
2022-06-27  6:08 ` Alexander Stein [this message]
2022-06-27  8:16 ` Shawn Guo
2022-07-08 14:09 ` Martyn Welch

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=12006796.O9o76ZdvQC@steina-w \
    --to=alexander.stein@ew.tq-group.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marex@denx.de \
    --cc=martyn.welch@collabora.com \
    --cc=paul.elder@ideasonboard.com \
    --cc=shawnguo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.