EDAC: Aspeed: Use devm_platform_ioremap_resource() in aspeed_probe()
Subsystems (4)
PATCH 1/1 EDAC: Aspeed: Use devm_platform_ioremap_resource() in aspeed_probe()
From: Markus Elfring <[email protected]>
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 <[email protected]>
--- drivers/edac/aspeed_edac.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/edac/aspeed_edac.c +1 -6
@@ -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
Quoted 9 lines · Markus Elfring
From: Markus Elfring <[email protected]>
Date: Sat, 21 Sep 2019 18:32:46 +0200Simplify this function implementation by using a known wrapper function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>
Acked-by Joel Stanley <[email protected]>
Quoted 5 lines · Joel Stanley
Quoted 4 lines · Markus Elfring
From: Markus Elfring <[email protected]>
Date: Sat, 21 Sep 2019 18:32:46 +0200
Quoted 7 lines
Quoted 5 lines
Simplify this function implementation by using a known wrapper function.
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>Acked-by Joel Stanley <[email protected]>
Applied, thanks.
Signature · 4 lines
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette