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>] [day] [month] [year] [list]
Message-Id: <20230712024421.15005-1-frank.li@vivo.com>
Date:   Wed, 12 Jul 2023 10:44:21 +0800
From:   Yangtao Li <frank.li@...o.com>
To:     Lizhi Hou <lizhi.hou@....com>, Brian Xu <brian.xu@....com>,
        Raj Kumar Rampelli <raj.kumar.rampelli@....com>,
        Vinod Koul <vkoul@...nel.org>,
        Michal Simek <michal.simek@....com>
Cc:     Yangtao Li <frank.li@...o.com>, dmaengine@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] dmaengine: xilinx: xdma: Convert to devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@...o.com>
---
patch based on next
 drivers/dma/xilinx/xdma.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index ad5ff63354cf..630927dc90e8 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -885,15 +885,9 @@ static int xdma_probe(struct platform_device *pdev)
 	xdev->irq_start = res->start;
 	xdev->irq_num = res->end - res->start + 1;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		xdma_err(xdev, "failed to get io resource");
-		goto failed;
-	}
-
-	reg_base = devm_ioremap_resource(&pdev->dev, res);
+	reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(reg_base)) {
-		xdma_err(xdev, "ioremap failed");
+		ret = PTR_ERR(reg_base);
 		goto failed;
 	}
 
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ