* [PATCH linux-next 0/2] Use dev_err_probe() in gpu
@ 2025-04-02 11:36 shao.mingyin
[not found] ` <20250402193852834atJ7eho66TlnKOIMSvpfr@zte.com.cn>
[not found] ` <20250402193758365XauggSF2EWBYY-e_jgNch@zte.com.cn>
0 siblings, 2 replies; 4+ messages in thread
From: shao.mingyin @ 2025-04-02 11:36 UTC (permalink / raw)
To: thierry.reding, laurent.pinchart
Cc: mperttunen, airlied, simona, jonathanh, dri-devel, linux-tegra,
linux-kernel, laurent.pinchart, tomi.valkeinen, maarten.lankhorst,
mripard, tzimmermann, michal.simek, linux-arm-kernel, yang.yang29,
xu.xin16, ye.xingchen, zhang.enpei
From: Zhang Enpei <zhang.enpei@zte.com.cn>
Use dev_err_probe() to simplify the following code
sequence:
if (err != -EPROBE_DEFER)
dev_err(dev, ...);
else
dev_dbg(dev, ...);
return err;
Zhang Enpei (2):
gpu: drm: tegra: dpaux: Use dev_err_probe()
gpu: drm: xlnx: zynqmp_dp: Use dev_err_probe()
drivers/gpu/drm/tegra/dpaux.c | 11 +++--------
drivers/gpu/drm/xlnx/zynqmp_dp.c | 6 ++----
2 files changed, 5 insertions(+), 12 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH linux-next 2/2] gpu: drm: xlnx: zynqmp_dp: Use dev_err_probe()
[not found] ` <20250402193852834atJ7eho66TlnKOIMSvpfr@zte.com.cn>
@ 2025-04-02 12:49 ` Laurent Pinchart
2025-04-16 11:42 ` Tomi Valkeinen
1 sibling, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2025-04-02 12:49 UTC (permalink / raw)
To: shao.mingyin
Cc: thierry.reding, mperttunen, airlied, simona, jonathanh, dri-devel,
linux-tegra, linux-kernel, tomi.valkeinen, maarten.lankhorst,
mripard, tzimmermann, michal.simek, linux-arm-kernel, yang.yang29,
xu.xin16, ye.xingchen, zhang.enpei
On Wed, Apr 02, 2025 at 07:38:52PM +0800, shao.mingyin@zte.com.cn wrote:
> From: Zhang Enpei <zhang.enpei@zte.com.cn>
>
> Replace the open-code with dev_err_probe() to simplify the code.
>
> Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/xlnx/zynqmp_dp.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> index a6a4a871f197..28efa4c7ec8e 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> @@ -2466,10 +2466,8 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub)
>
> dp->reset = devm_reset_control_get(dp->dev, NULL);
> if (IS_ERR(dp->reset)) {
> - if (PTR_ERR(dp->reset) != -EPROBE_DEFER)
> - dev_err(dp->dev, "failed to get reset: %ld\n",
> - PTR_ERR(dp->reset));
> - ret = PTR_ERR(dp->reset);
> + ret = dev_err_probe(dp->dev, PTR_ERR(dp->reset),
> + "failed to get reset\n");
> goto err_free;
> }
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH linux-next 2/2] gpu: drm: xlnx: zynqmp_dp: Use dev_err_probe()
[not found] ` <20250402193852834atJ7eho66TlnKOIMSvpfr@zte.com.cn>
2025-04-02 12:49 ` [PATCH linux-next 2/2] gpu: drm: xlnx: zynqmp_dp: Use dev_err_probe() Laurent Pinchart
@ 2025-04-16 11:42 ` Tomi Valkeinen
1 sibling, 0 replies; 4+ messages in thread
From: Tomi Valkeinen @ 2025-04-16 11:42 UTC (permalink / raw)
To: shao.mingyin, thierry.reding, laurent.pinchart
Cc: mperttunen, airlied, simona, jonathanh, dri-devel, linux-tegra,
linux-kernel, maarten.lankhorst, mripard, tzimmermann,
michal.simek, linux-arm-kernel, yang.yang29, xu.xin16,
ye.xingchen, zhang.enpei, Sagar, Vishal
Hi,
On 02/04/2025 14:38, shao.mingyin@zte.com.cn wrote:
> From: Zhang Enpei <zhang.enpei@zte.com.cn>
>
> Replace the open-code with dev_err_probe() to simplify the code.
>
> Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
> ---
> drivers/gpu/drm/xlnx/zynqmp_dp.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> index a6a4a871f197..28efa4c7ec8e 100644
> --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c
> +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c
> @@ -2466,10 +2466,8 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub)
>
> dp->reset = devm_reset_control_get(dp->dev, NULL);
> if (IS_ERR(dp->reset)) {
> - if (PTR_ERR(dp->reset) != -EPROBE_DEFER)
> - dev_err(dp->dev, "failed to get reset: %ld\n",
> - PTR_ERR(dp->reset));
> - ret = PTR_ERR(dp->reset);
> + ret = dev_err_probe(dp->dev, PTR_ERR(dp->reset),
> + "failed to get reset\n");
> goto err_free;
> }
>
Thanks. I can pick this up via drm-misc.
Tomi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH linux-next 1/2] gpu: drm: tegra: dpaux: Use dev_err_probe()
[not found] ` <20250402193758365XauggSF2EWBYY-e_jgNch@zte.com.cn>
@ 2025-05-07 15:44 ` Thierry Reding
0 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2025-05-07 15:44 UTC (permalink / raw)
To: shao.mingyin
Cc: laurent.pinchart, mperttunen, airlied, simona, jonathanh,
dri-devel, linux-tegra, linux-kernel, tomi.valkeinen,
maarten.lankhorst, mripard, tzimmermann, michal.simek,
linux-arm-kernel, yang.yang29, xu.xin16, ye.xingchen, zhang.enpei
[-- Attachment #1: Type: text/plain, Size: 449 bytes --]
On Wed, Apr 02, 2025 at 07:37:58PM +0800, shao.mingyin@zte.com.cn wrote:
> From: Zhang Enpei <zhang.enpei@zte.com.cn>
>
> Replace the open-code with dev_err_probe() to simplify the code.
>
> Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
> ---
> drivers/gpu/drm/tegra/dpaux.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
Applied, thanks.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-07 17:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-02 11:36 [PATCH linux-next 0/2] Use dev_err_probe() in gpu shao.mingyin
[not found] ` <20250402193852834atJ7eho66TlnKOIMSvpfr@zte.com.cn>
2025-04-02 12:49 ` [PATCH linux-next 2/2] gpu: drm: xlnx: zynqmp_dp: Use dev_err_probe() Laurent Pinchart
2025-04-16 11:42 ` Tomi Valkeinen
[not found] ` <20250402193758365XauggSF2EWBYY-e_jgNch@zte.com.cn>
2025-05-07 15:44 ` [PATCH linux-next 1/2] gpu: drm: tegra: dpaux: " Thierry Reding
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).