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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af600eff-88ea-498b-9cbc-2c441f47d7fa@nxp.com>
Date: Wed, 8 Jan 2025 11:37:55 +0800
From: Liu Ying <victor.liu@....com>
To: Alexander Stein <alexander.stein@...tq-group.com>,
 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>
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 3/4] drm/bridge: imx-ldb-helper: Use dev_err_probe

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/imx-ldb-helper.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/imx/imx-ldb-helper.c b/drivers/gpu/drm/bridge/imx/imx-ldb-helper.c
> index 9b5bebbe357dd..2c9b862af74af 100644
> --- a/drivers/gpu/drm/bridge/imx/imx-ldb-helper.c
> +++ b/drivers/gpu/drm/bridge/imx/imx-ldb-helper.c
> @@ -167,7 +167,7 @@ int ldb_find_next_bridge_helper(struct ldb *ldb)
>  {
>  	struct device *dev = ldb->dev;
>  	struct ldb_channel *ldb_ch;
> -	int ret, i;
> +	int i;
>  
>  	for (i = 0; i < MAX_LDB_CHAN_NUM; i++) {
>  		ldb_ch = ldb->channel[i];
> @@ -177,14 +177,9 @@ int ldb_find_next_bridge_helper(struct ldb *ldb)
>  
>  		ldb_ch->next_bridge = devm_drm_of_get_bridge(dev, ldb_ch->np,
>  							     1, 0);
> -		if (IS_ERR(ldb_ch->next_bridge)) {
> -			ret = PTR_ERR(ldb_ch->next_bridge);
> -			if (ret != -EPROBE_DEFER)
> -				DRM_DEV_ERROR(dev,
> -					      "failed to get next bridge: %d\n",
> -					      ret);
> -			return ret;
> -		}
> +		if (IS_ERR(ldb_ch->next_bridge))
> +			return dev_err_probe(dev, PTR_ERR(ldb_ch->next_bridge),
> +					     "failed to find next bridge\n");

Nit: s/find/get/, since "get" was used.

>  	}
>  
>  	return 0;

ldb_init_helper() may return -EPROBE_DEFER too, so it needs to be changed.

-- 
Regards,
Liu Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ