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: <e01cdb99-8497-4fec-b423-a0bfb483ac75@web.de>
Date: Mon, 5 Feb 2024 11:42:28 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: iommu@...ts.linux.dev, kernel-janitors@...r.kernel.org,
 Jörg Rödel <joro@...tes.org>,
 Robin Murphy <robin.murphy@....com>, Will Deacon <will@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] iommu/ipmmu-vmsa: Use
 devm_platform_get_and_ioremap_resource() in ipmmu_probe()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 5 Feb 2024 11:36:51 +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/iommu/ipmmu-vmsa.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c
index ace1fc4bd34b..12685dd2dd31 100644
--- a/drivers/iommu/ipmmu-vmsa.c
+++ b/drivers/iommu/ipmmu-vmsa.c
@@ -1025,8 +1025,7 @@ static int ipmmu_probe(struct platform_device *pdev)
 		return ret;

 	/* Map I/O memory and request IRQ. */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mmu->base = devm_ioremap_resource(&pdev->dev, res);
+	mmu->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(mmu->base))
 		return PTR_ERR(mmu->base);

--
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ