diff mbox series

crypto: amlogic: fix devm_platform_ioremap_resource.cocci warnings

Message ID alpine.DEB.2.21.1910151239360.2818@hadrien (mailing list archive)
State Not Applicable
Delegated to: Herbert Xu
Headers show
Series crypto: amlogic: fix devm_platform_ioremap_resource.cocci warnings | expand

Commit Message

Julia Lawall Oct. 15, 2019, 10:40 a.m. UTC
From: kbuild test robot <lkp@intel.com>

drivers/crypto/amlogic/amlogic-gxl-core.c:241:1-9: WARNING: Use devm_platform_ioremap_resource for mc -> base

 Use devm_platform_ioremap_resource helper which wraps
 platform_get_resource() and devm_ioremap_resource() together.

Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci

Fixes: 28b8a60c6c83 ("crypto: amlogic: Add crypto accelerator for amlogic GXL")
CC: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

url:    https://github.com/0day-ci/linux/commits/Corentin-Labbe/crypto-add-amlogic-crypto-offloader-driver/20191014-133654
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
:::::: branch date: 7 hours ago
:::::: commit date: 7 hours ago

 amlogic-gxl-core.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

--- a/drivers/crypto/amlogic/amlogic-gxl-core.c
+++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
@@ -223,7 +223,6 @@  static void meson_unregister_algs(struct

 static int meson_crypto_probe(struct platform_device *pdev)
 {
-	struct resource *res;
 	struct meson_dev *mc;
 	int err, i;

@@ -237,8 +236,7 @@  static int meson_crypto_probe(struct pla
 	mc->dev = &pdev->dev;
 	platform_set_drvdata(pdev, mc);

-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mc->base = devm_ioremap_resource(&pdev->dev, res);
+	mc->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mc->base)) {
 		err = PTR_ERR(mc->base);
 		dev_err(&pdev->dev, "Cannot request MMIO err=%d\n", err);