mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno  <angelogioacchino.delregno@collabora.com>
To: Hsin-Yi Wang <hsinyi@chromium.org>,
	Jassi Brar <jassisinghbrar@gmail.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] mailbox: mtk-cmdq: Silent EPROBE_DEFER errors for clks
Date: Thu, 9 Dec 2021 15:52:12 +0100	[thread overview]
Message-ID: <4080b8a4-5256-5680-1d70-017f2fed5117@collabora.com> (raw)
In-Reply-To: <20211209065948.1796663-1-hsinyi@chromium.org>

Il 09/12/21 07:59, Hsin-Yi Wang ha scritto:
> Silent the error if it's EPROBE_DEFER for clks.
> 
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> ---
>   drivers/mailbox/mtk-cmdq-mailbox.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 

Hello! Thanks for the patch!
However, there's something to improve...

> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
> index a8845b162dbf..087fb7334166 100644
> --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> @@ -573,7 +573,10 @@ static int cmdq_probe(struct platform_device *pdev)
>   				cmdq->clocks[alias_id].id = clk_names[alias_id];
>   				cmdq->clocks[alias_id].clk = of_clk_get(node, 0);
>   				if (IS_ERR(cmdq->clocks[alias_id].clk)) {
> -					dev_err(dev, "failed to get gce clk: %d\n", alias_id);
> +					dev_err_probe(dev,
> +						PTR_ERR(cmdq->clocks[alias_id].clk),
> +						"failed to get gce clk: %d\n",
> +						alias_id);

You can just return dev_err_probe(...)

>   					return PTR_ERR(cmdq->clocks[alias_id].clk);

...so this return gets removed.

>   				}
>   			}
> @@ -582,7 +585,8 @@ static int cmdq_probe(struct platform_device *pdev)
>   		cmdq->clocks[alias_id].id = clk_name;
>   		cmdq->clocks[alias_id].clk = devm_clk_get(&pdev->dev, clk_name);
>   		if (IS_ERR(cmdq->clocks[alias_id].clk)) {
> -			dev_err(dev, "failed to get gce clk\n");
> +			dev_err_probe(dev, PTR_ERR(cmdq->clocks[alias_id].clk),
> +				"failed to get gce clk\n");
>   			return PTR_ERR(cmdq->clocks[alias_id].clk);

Same here:
return dev_err_probe(dev, PTR_ERR(cmdq->clocks[alias_id].clk),
		     "failed to get gce clk\n");

>   		}
>   	}
> 

Regards,
- Angelo

      reply	other threads:[~2021-12-09 14:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09  6:59 Hsin-Yi Wang
2021-12-09 14:52 ` AngeloGioacchino Del Regno [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=4080b8a4-5256-5680-1d70-017f2fed5117@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=hsinyi@chromium.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.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®