mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/5] EDAC, mellanox: Convert to devm_platform_ioremap_resource()
@ 2023-07-04 10:18 Yangtao Li
  2023-07-04 10:18 ` [PATCH 2/5] EDAC/dmc520: " Yangtao Li
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Yangtao Li @ 2023-07-04 10:18 UTC (permalink / raw)
  To: Shravan Kumar Ramani, Borislav Petkov, Tony Luck, James Morse,
	Mauro Carvalho Chehab, Robert Richter
  Cc: Yangtao Li, linux-edac, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/edac/bluefield_edac.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/edac/bluefield_edac.c b/drivers/edac/bluefield_edac.c
index e4736eb37bfb..0d09add30460 100644
--- a/drivers/edac/bluefield_edac.c
+++ b/drivers/edac/bluefield_edac.c
@@ -245,7 +245,6 @@ static int bluefield_edac_mc_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct edac_mc_layer layers[1];
 	struct mem_ctl_info *mci;
-	struct resource *emi_res;
 	unsigned int mc_idx, dimm_count;
 	int rc, ret;
 
@@ -266,10 +265,6 @@ static int bluefield_edac_mc_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	emi_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!emi_res)
-		return -EINVAL;
-
 	layers[0].type = EDAC_MC_LAYER_SLOT;
 	layers[0].size = dimm_count;
 	layers[0].is_virt_csrow = true;
@@ -281,7 +276,7 @@ static int bluefield_edac_mc_probe(struct platform_device *pdev)
 	priv = mci->pvt_info;
 
 	priv->dimm_per_mc = dimm_count;
-	priv->emi_base = devm_ioremap_resource(dev, emi_res);
+	priv->emi_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->emi_base)) {
 		dev_err(dev, "failed to map EMI IO resource\n");
 		ret = PTR_ERR(priv->emi_base);
-- 
2.39.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-23 13:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 10:18 [PATCH 1/5] EDAC, mellanox: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-04 10:18 ` [PATCH 2/5] EDAC/dmc520: " Yangtao Li
2023-07-04 10:18 ` [PATCH 3/5] EDAC/synopsys: " Yangtao Li
2023-07-04 12:17   ` Michal Simek
2024-01-23 13:57     ` Borislav Petkov
2023-07-04 10:18 ` [PATCH 4/5] EDAC/ti: " Yangtao Li
2023-07-04 10:18 ` [PATCH 5/5] EDAC/xgene: " Yangtao Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®