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: <20250403154833001aNpIIRBQWEw67Oo8nChch@zte.com.cn>
Date: Thu, 3 Apr 2025 15:48:33 +0800 (CST)
From: <shao.mingyin@....com.cn>
To: <jonnyc@...zon.com>
Cc: <lpieralisi@...nel.org>, <kw@...ux.com>,
        <manivannan.sadhasivam@...aro.org>, <robh@...nel.org>,
        <bhelgaas@...gle.com>, <linux-pci@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <yang.yang29@....com.cn>,
        <xu.xin16@....com.cn>, <ye.xingchen@....com.cn>
Subject: [PATCH] PCI: al: Use devm_platform_ioremap_resource_byname

From: Xie Ludan <xie.ludan@....com.cn>

Introduce devm_platform_ioremap_resource_byname() to simplify
resource retrieval and mapping.This new function consolidates
platform_get_resource_byname() and devm_ioremap_resource() into a single
call, improving code readability and reducing API call overhead.

Signed-off-by: Xie Ludan <xie.ludan@....com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@....com.cn>
---
 drivers/pci/controller/dwc/pcie-al.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-al.c b/drivers/pci/controller/dwc/pcie-al.c
index 643115f74092..f0613d442578 100644
--- a/drivers/pci/controller/dwc/pcie-al.c
+++ b/drivers/pci/controller/dwc/pcie-al.c
@@ -353,9 +353,7 @@ static int al_pcie_probe(struct platform_device *pdev)
 	}
 	al_pcie->ecam_size = resource_size(ecam_res);

-	controller_res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
-						      "controller");
-	al_pcie->controller_base = devm_ioremap_resource(dev, controller_res);
+	al_pcie->controller_base = devm_platform_ioremap_resource_byname(pdev, "controller");
 	if (IS_ERR(al_pcie->controller_base)) {
 		dev_err(dev, "couldn't remap controller base %pR\n",
 			controller_res);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ