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: <4fc017e4-c695-40d3-aed4-cbf34d44e6fa@web.de>
Date: Sun, 4 Feb 2024 21:36:21 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: sparclinux@...r.kernel.org, kernel-janitors@...r.kernel.org,
 Andreas Larsson <andreas@...sler.com>, "David S. Miller"
 <davem@...emloft.net>, Rob Herring <robh@...nel.org>,
 Sam Ravnborg <sam@...nborg.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] sparc: leon: grpci1: Use
 devm_platform_get_and_ioremap_resource() in grpci1_of_probe()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 4 Feb 2024 21:21:31 +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>
---
 arch/sparc/kernel/leon_pci_grpci1.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/sparc/kernel/leon_pci_grpci1.c b/arch/sparc/kernel/leon_pci_grpci1.c
index 8700a0e3b0df..ed2fd7b10dfe 100644
--- a/arch/sparc/kernel/leon_pci_grpci1.c
+++ b/arch/sparc/kernel/leon_pci_grpci1.c
@@ -537,8 +537,7 @@ static int grpci1_of_probe(struct platform_device *ofdev)
 	priv->dev = &ofdev->dev;

 	/* find device register base address */
-	res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
-	regs = devm_ioremap_resource(&ofdev->dev, res);
+	regs = devm_platform_get_and_ioremap_resource(ofdev, 0, &res);
 	if (IS_ERR(regs))
 		return PTR_ERR(regs);

--
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ