Linux-EDAC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] EDAC: Aspeed: Use devm_platform_ioremap_resource() in aspeed_probe()
@ 2019-09-21 16:46 Markus Elfring
  2019-10-23  6:23 ` Joel Stanley
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Elfring @ 2019-09-21 16:46 UTC (permalink / raw)
  To: linux-edac, linux-aspeed, linux-arm-kernel, Andrew Jeffery,
	Borislav Petkov, James Morse, Joel Stanley, Robert Richter,
	Stefan Schaeckeler, Tony Luck
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 21 Sep 2019 18:32:46 +0200

Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/edac/aspeed_edac.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
index 5634437bb39d..09a9e3de9595 100644
--- a/drivers/edac/aspeed_edac.c
+++ b/drivers/edac/aspeed_edac.c
@@ -281,16 +281,11 @@ static int aspeed_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct edac_mc_layer layers[2];
 	struct mem_ctl_info *mci;
-	struct resource *res;
 	void __iomem *regs;
 	u32 reg04;
 	int rc;

-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENOENT;
-
-	regs = devm_ioremap_resource(dev, res);
+	regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(regs))
 		return PTR_ERR(regs);

--
2.23.0


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

* Re: [PATCH] EDAC: Aspeed: Use devm_platform_ioremap_resource() in aspeed_probe()
  2019-09-21 16:46 [PATCH] EDAC: Aspeed: Use devm_platform_ioremap_resource() in aspeed_probe() Markus Elfring
@ 2019-10-23  6:23 ` Joel Stanley
  2019-10-24 13:45   ` Borislav Petkov
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Stanley @ 2019-10-23  6:23 UTC (permalink / raw)
  To: Markus Elfring
  Cc: linux-edac, linux-aspeed, Linux ARM, Andrew Jeffery,
	Borislav Petkov, James Morse, Robert Richter, Stefan Schaeckeler,
	Tony Luck, LKML, kernel-janitors

On Sat, 21 Sep 2019 at 16:47, Markus Elfring <Markus.Elfring@web.de> wrote:
>
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 21 Sep 2019 18:32:46 +0200
>
> Simplify this function implementation by using a known wrapper function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Acked-by: Joel Stanley <joel@jms.id.au>

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

* Re: [PATCH] EDAC: Aspeed: Use devm_platform_ioremap_resource() in aspeed_probe()
  2019-10-23  6:23 ` Joel Stanley
@ 2019-10-24 13:45   ` Borislav Petkov
  0 siblings, 0 replies; 3+ messages in thread
From: Borislav Petkov @ 2019-10-24 13:45 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Markus Elfring, linux-edac, linux-aspeed, Linux ARM,
	Andrew Jeffery, James Morse, Robert Richter, Stefan Schaeckeler,
	Tony Luck, LKML, kernel-janitors

On Wed, Oct 23, 2019 at 06:23:53AM +0000, Joel Stanley wrote:
> On Sat, 21 Sep 2019 at 16:47, Markus Elfring <Markus.Elfring@web.de> wrote:
> >
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Sat, 21 Sep 2019 18:32:46 +0200
> >
> > Simplify this function implementation by using a known wrapper function.
> >
> > This issue was detected by using the Coccinelle software.
> >
> > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> 
> Acked-by: Joel Stanley <joel@jms.id.au>

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-21 16:46 [PATCH] EDAC: Aspeed: Use devm_platform_ioremap_resource() in aspeed_probe() Markus Elfring
2019-10-23  6:23 ` Joel Stanley
2019-10-24 13:45   ` Borislav Petkov

Linux-EDAC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \
		linux-edac@vger.kernel.org
	public-inbox-index linux-edac

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git