lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1842588.VLH7GnMWUR@steina-w>
Date: Wed, 08 Jan 2025 10:36:24 +0100
From: Alexander Stein <alexander.stein@...tq-group.com>
To: Andrzej Hajda <andrzej.hajda@...el.com>, Neil Armstrong <neil.armstrong@...aro.org>, Robert Foss <rfoss@...nel.org>, Laurent Pinchart <Laurent.pinchart@...asonboard.com>, Jonas Karlman <jonas@...boo.se>, Jernej Skrabec <jernej.skrabec@...il.com>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>, Liu Ying <victor.liu@....com>
Cc: dri-devel@...ts.freedesktop.org, imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/4] drm/bridge: imx8qxp-pxl2dpi: Use dev_err_probe

Hi,

Am Mittwoch, 8. Januar 2025, 04:22:19 CET schrieb Liu Ying:
> On 01/07/2025, Alexander Stein wrote:
> > This simplifies the code and gives additional information upon deferral.
> > 
> > Signed-off-by: Alexander Stein <alexander.stein@...tq-group.com>
> > ---
> >  drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c | 26 ++++++--------------
> >  1 file changed, 7 insertions(+), 19 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c b/drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c
> > index 65cf3a6c8ec69..038eaff889bb7 100644
> > --- a/drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c
> > +++ b/drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c
> > @@ -398,20 +398,12 @@ static int imx8qxp_pxl2dpi_bridge_probe(struct platform_device *pdev)
> >  		return -ENOMEM;
> >  
> >  	p2d->regmap = syscon_node_to_regmap(np->parent);
> > -	if (IS_ERR(p2d->regmap)) {
> > -		ret = PTR_ERR(p2d->regmap);
> > -		if (ret != -EPROBE_DEFER)
> > -			DRM_DEV_ERROR(dev, "failed to get regmap: %d\n", ret);
> > -		return ret;
> > -	}
> > +	if (IS_ERR(p2d->regmap))
> > +		return dev_err_probe(dev, ret, "failed to get regmap\n");
> 
> s/ret/PTR_ERR(p2d->regmap)/

Thanks for the catch.

> >  
> >  	ret = imx_scu_get_handle(&p2d->ipc_handle);
> > -	if (ret) {
> > -		if (ret != -EPROBE_DEFER)
> > -			DRM_DEV_ERROR(dev, "failed to get SCU ipc handle: %d\n",
> > -				      ret);
> > -		return ret;
> > -	}
> > +	if (ret)
> > +		return dev_err_probe(dev, ret, "failed to get SCU ipc handle\n");
> >  
> >  	p2d->dev = dev;
> >  
> > @@ -422,13 +414,9 @@ static int imx8qxp_pxl2dpi_bridge_probe(struct platform_device *pdev)
> >  	}
> >  
> >  	p2d->next_bridge = imx8qxp_pxl2dpi_find_next_bridge(p2d);
> > -	if (IS_ERR(p2d->next_bridge)) {
> > -		ret = PTR_ERR(p2d->next_bridge);
> > -		if (ret != -EPROBE_DEFER)
> > -			DRM_DEV_ERROR(dev, "failed to find next bridge: %d\n",
> > -				      ret);
> > -		return ret;
> > -	}
> > +	if (IS_ERR(p2d->next_bridge))
> > +		return dev_err_probe(dev, PTR_ERR(p2d->next_bridge),
> > +				     "failed to find next bridge\n");
> >  
> >  	ret = imx8qxp_pxl2dpi_set_pixel_link_sel(p2d);
> >  	if (ret)
> 
> imx8qxp_pxl2dpi_parse_dt_companion() may return -EPROBE_DEFER too, so it needs
> to be changed.

True, I added a dev_err_probe to that function when companion bridge cannot
be found.

Best regards,
Alexander
-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ