From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>, Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
owen <qwt9588@gmail.com>, Jagan Teki <jagan@amarulasolutions.com>,
Marek Vasut <marex@denx.de>,
Adrien Grassein <adrien.grassein@gmail.com>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Sam Ravnborg <sam@ravnborg.org>,
Bjorn Andersson <andersson@kernel.org>,
Vinod Koul <vkoul@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Vinay Simha BN <simhavcs@gmail.com>,
Christopher Vollo <chris@renewoutreach.org>,
Jessica Zhang <quic_jesszhan@quicinc.com>,
Marijn Suijten <marijn.suijten@somainline.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@somainline.org>,
kernel@collabora.com, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH v2 0/9] drm: Switch from dev_err to dev_err_probe for missing DSI host error path
Date: Fri, 1 Mar 2024 08:34:31 +0200 [thread overview]
Message-ID: <20240301063431.GM30889@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20240229-anx7625-defer-log-no-dsi-host-v2-0-00506941049a@collabora.com>
Hi Nícolas,
On Thu, Feb 29, 2024 at 07:12:06PM -0500, Nícolas F. R. A. Prado wrote:
> This series changes every occurence of the following pattern:
>
> dsi_host = of_find_mipi_dsi_host_by_node(dsi);
> if (!dsi_host) {
> dev_err(dev, "failed to find dsi host\n");
> return -EPROBE_DEFER;
> }
>
> into
>
> dsi_host = of_find_mipi_dsi_host_by_node(dsi);
> if (!dsi_host)
> return dev_err_probe(dev, -EPROBE_DEFER, "failed to find dsi host\n");
>
> This registers the defer probe reason (so it can later be printed by the
> driver core or checked on demand through the devices_deferred file in
> debugfs) and prevents errors to be spammed in the kernel log every time
> the driver retries to probe, unnecessarily alerting userspace about
> something that is a normal part of the boot process.
The idea is good, but I have a small issue with patches 1/9 to 7/9. They
all patch a function that is called by the probe function. Calling
dev_err_probe() in such functions is error-prone. I had to manually
check when reviewing the patches that those functions were indeed called
at probe time, and not through other code paths, and I also had to check
that no callers were using dev_err_probe() in the error handling path,
as that would have overridden the error message.
Would there be a way to move the dev_err_probe() to the top-level ? I
understand it's not always possible or convenient, but if it was doable
in at least some of the drivers, I think it would be better. I'll let
you be the judge.
> I have omitted a Fixes: tag in the last patch, for the truly-nt35597
> panel, because it predates the dev_err_probe() helper.
>
> Changes in v2:
> - Added patches 2 onwards to fix all occurences of this pattern instead
> of just for the anx7625 driver
> - Link to v1: https://lore.kernel.org/r/20240226-anx7625-defer-log-no-dsi-host-v1-1-242b1af31884@collabora.com
>
> ---
> Nícolas F. R. A. Prado (9):
> drm/bridge: anx7625: Don't log an error when DSI host can't be found
> drm/bridge: icn6211: Don't log an error when DSI host can't be found
> drm/bridge: lt8912b: Don't log an error when DSI host can't be found
> drm/bridge: lt9611: Don't log an error when DSI host can't be found
> drm/bridge: lt9611uxc: Don't log an error when DSI host can't be found
> drm/bridge: tc358775: Don't log an error when DSI host can't be found
> drm/bridge: dpc3433: Don't log an error when DSI host can't be found
> drm/panel: novatek-nt35950: Don't log an error when DSI host can't be found
> drm/panel: truly-nt35597: Don't log an error when DSI host can't be found
>
> drivers/gpu/drm/bridge/analogix/anx7625.c | 6 ++----
> drivers/gpu/drm/bridge/chipone-icn6211.c | 6 ++----
> drivers/gpu/drm/bridge/lontium-lt8912b.c | 6 ++----
> drivers/gpu/drm/bridge/lontium-lt9611.c | 6 ++----
> drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 6 ++----
> drivers/gpu/drm/bridge/tc358775.c | 6 ++----
> drivers/gpu/drm/bridge/ti-dlpc3433.c | 17 +++++++++--------
> drivers/gpu/drm/panel/panel-novatek-nt35950.c | 6 ++----
> drivers/gpu/drm/panel/panel-truly-nt35597.c | 6 ++----
> 9 files changed, 25 insertions(+), 40 deletions(-)
> ---
> base-commit: 2ae0a045e6814c8c1d676d6153c605a65746aa29
> change-id: 20240226-anx7625-defer-log-no-dsi-host-c3f9ccbcb287
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2024-03-01 6:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-01 0:12 [PATCH v2 0/9] drm: Switch from dev_err to dev_err_probe for missing DSI host error path Nícolas F. R. A. Prado
2024-03-01 0:12 ` [PATCH v2 1/9] drm/bridge: anx7625: Don't log an error when DSI host can't be found Nícolas F. R. A. Prado
2024-03-01 0:12 ` [PATCH v2 2/9] drm/bridge: icn6211: " Nícolas F. R. A. Prado
2024-03-01 0:12 ` [PATCH v2 3/9] drm/bridge: lt8912b: " Nícolas F. R. A. Prado
2024-03-01 0:12 ` [PATCH v2 4/9] drm/bridge: lt9611: " Nícolas F. R. A. Prado
2024-03-01 0:12 ` [PATCH v2 5/9] drm/bridge: lt9611uxc: " Nícolas F. R. A. Prado
2024-03-01 0:12 ` [PATCH v2 6/9] drm/bridge: tc358775: " Nícolas F. R. A. Prado
2024-03-01 0:12 ` [PATCH v2 7/9] drm/bridge: dpc3433: " Nícolas F. R. A. Prado
2024-03-01 0:12 ` [PATCH v2 8/9] drm/panel: novatek-nt35950: " Nícolas F. R. A. Prado
2024-03-01 6:29 ` Laurent Pinchart
2024-03-01 8:44 ` AngeloGioacchino Del Regno
2024-03-08 15:03 ` Nícolas F. R. A. Prado
2024-03-01 0:12 ` [PATCH v2 9/9] drm/panel: truly-nt35597: " Nícolas F. R. A. Prado
2024-03-01 0:31 ` Abhinav Kumar
2024-03-01 6:30 ` Laurent Pinchart
2024-03-01 8:44 ` AngeloGioacchino Del Regno
2024-03-01 8:56 ` Laurent Pinchart
2024-03-01 9:37 ` AngeloGioacchino Del Regno
2024-03-01 10:54 ` Neil Armstrong
2024-03-01 6:34 ` Laurent Pinchart [this message]
2024-03-01 16:19 ` [PATCH v2 0/9] drm: Switch from dev_err to dev_err_probe for missing DSI host error path Nícolas F. R. A. Prado
2024-03-01 21:44 ` Laurent Pinchart
2024-03-01 8:47 ` AngeloGioacchino Del Regno
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=20240301063431.GM30889@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=adrien.grassein@gmail.com \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=andrzej.hajda@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=angelogioacchino.delregno@somainline.org \
--cc=chris@renewoutreach.org \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marex@denx.de \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=nfraprado@collabora.com \
--cc=quic_jesszhan@quicinc.com \
--cc=qwt9588@gmail.com \
--cc=rfoss@kernel.org \
--cc=sam@ravnborg.org \
--cc=simhavcs@gmail.com \
--cc=srinivas.kandagatla@linaro.org \
--cc=tzimmermann@suse.de \
--cc=vkoul@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox