mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yangtao Li <frank.li@vivo.com>
To: Khuong Dinh <khuong@os.amperecomputing.com>,
	Borislav Petkov <bp@alien8.de>, Tony Luck <tony.luck@intel.com>,
	James Morse <james.morse@arm.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Robert Richter <rric@kernel.org>
Cc: Yangtao Li <frank.li@vivo.com>,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] EDAC/xgene: Convert to devm_platform_ioremap_resource()
Date: Tue,  4 Jul 2023 18:18:10 +0800	[thread overview]
Message-ID: <20230704101811.49637-5-frank.li@vivo.com> (raw)
In-Reply-To: <20230704101811.49637-1-frank.li@vivo.com>

Use devm_platform_ioremap_resource() to simplify code.

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

diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
index c52b9dd9154c..5ac1a0d3495b 100644
--- a/drivers/edac/xgene_edac.c
+++ b/drivers/edac/xgene_edac.c
@@ -1845,7 +1845,6 @@ static int xgene_edac_probe(struct platform_device *pdev)
 {
 	struct xgene_edac *edac;
 	struct device_node *child;
-	struct resource *res;
 	int rc;
 
 	edac = devm_kzalloc(&pdev->dev, sizeof(*edac), GFP_KERNEL);
@@ -1903,8 +1902,7 @@ static int xgene_edac_probe(struct platform_device *pdev)
 		edac->rb_map = NULL;
 	}
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	edac->pcp_csr = devm_ioremap_resource(&pdev->dev, res);
+	edac->pcp_csr = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(edac->pcp_csr)) {
 		dev_err(&pdev->dev, "no PCP resource address\n");
 		rc = PTR_ERR(edac->pcp_csr);
-- 
2.39.0


      parent reply	other threads:[~2023-07-04 10:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-04 10:18 [PATCH 1/5] EDAC, mellanox: " 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 ` Yangtao Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230704101811.49637-5-frank.li@vivo.com \
    --to=frank.li@vivo.com \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=khuong@os.amperecomputing.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®