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-next>] [day] [month] [year] [list]
Message-ID: <b236236a-9953-4246-a697-19ed1b22d86a@web.de>
Date: Mon, 5 Feb 2024 09:12:58 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: dri-devel@...ts.freedesktop.org, kernel-janitors@...r.kernel.org,
 Daniel Vetter <daniel@...ll.ch>, David Airlie <airlied@...il.com>,
 Douglas Anderson <dianders@...omium.org>, John Stultz <jstultz@...gle.com>,
 Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Maxime Ripard <mripard@...nel.org>, Sumit Semwal <sumit.semwal@...aro.org>,
 Thomas Zimmermann <tzimmermann@...e.de>, Tian Tao <tiantao6@...ilicon.com>,
 Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
 Xinliang Liu <xinliang.liu@...aro.org>,
 Xinwei Kong <kong.kongxinwei@...ilicon.com>,
 Yongqin Liu <yongqin.liu@...aro.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] drm/hisilicon: Use devm_platform_get_and_ioremap_resource()
 in dsi_parse_dt()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 5 Feb 2024 08:58:21 +0100

A wrapper function is available since the commit 890cc39a879906b63912482dfc41944579df2dc6
("drivers: provide devm_platform_get_and_ioremap_resource()").
Thus reuse existing functionality instead of keeping duplicate source code.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
index 566de4658719..1edf429c49d7 100644
--- a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
+++ b/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
@@ -834,8 +834,7 @@ static int dsi_parse_dt(struct platform_device *pdev, struct dw_dsi *dsi)
 		return PTR_ERR(ctx->pclk);
 	}

-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	ctx->base = devm_ioremap_resource(&pdev->dev, res);
+	ctx->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(ctx->base)) {
 		DRM_ERROR("failed to remap dsi io region\n");
 		return PTR_ERR(ctx->base);
--
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ