From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>, <kernel@collabora.com>,
<dri-devel@lists.freedesktop.org>,
<linux-mediatek@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] drm/mediatek: Don't print error if EDEFER_PROBE returned on component_add
Date: Thu, 6 Jun 2024 13:35:51 +0100 [thread overview]
Message-ID: <20240606133551.00007d14@Huawei.com> (raw)
In-Reply-To: <20240605-mtk-disp-rdma-dev-err-probe-v1-1-91259e1d3a93@collabora.com>
On Wed, 05 Jun 2024 12:50:25 -0400
Nícolas F. R. A. Prado <nfraprado@collabora.com> wrote:
> Use dev_err_probe() in the component_add() error path to prevent
> printing an error when the probe is deferred. This was observed on
> mt8195 with the disp-rdma driver:
>
> mediatek-disp-rdma 1c002000.rdma: Failed to add component: -517
>
> But the same pattern is used across many other drivers, so update them
> all.
>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> ---
> drivers/gpu/drm/mediatek/mtk_disp_aal.c | 2 +-
> drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 2 +-
> drivers/gpu/drm/mediatek/mtk_disp_color.c | 2 +-
> drivers/gpu/drm/mediatek/mtk_disp_gamma.c | 2 +-
> drivers/gpu/drm/mediatek/mtk_disp_merge.c | 2 +-
> drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 +-
> drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 2 +-
> drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 2 +-
> drivers/gpu/drm/mediatek/mtk_ethdr.c | 2 +-
> drivers/gpu/drm/mediatek/mtk_mdp_rdma.c | 2 +-
> 10 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_aal.c b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
> index 3ce8f32b06d5..892dc40458fb 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_aal.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
> @@ -197,7 +197,7 @@ static int mtk_disp_aal_probe(struct platform_device *pdev)
>
> ret = component_add(dev, &mtk_disp_aal_component_ops);
> if (ret)
> - dev_err(dev, "Failed to add component: %d\n", ret);
> + dev_err_probe(dev, ret, "Failed to add component\n");
Perhaps
return dev_err_probe(...)
return 0;
Whilst I can see you are focused on this one problem case, it
might be better to use dev_err_probe() for all the similar
cases earlier in these functions.
Then that return dev_err_probe() pattern will make more sense
as it will be consistent with all the other calls.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2024-06-06 12:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 16:50 [PATCH] drm/mediatek: Don't print error if EDEFER_PROBE returned on component_add Nícolas F. R. A. Prado
2024-06-06 9:40 ` AngeloGioacchino Del Regno
2024-06-06 12:35 ` Jonathan Cameron [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=20240606133551.00007d14@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.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 \
--cc=nfraprado@collabora.com \
--cc=p.zabel@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;
as well as URLs for NNTP newsgroup(s).