linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: amlogic: fix devm_platform_ioremap_resource.cocci warnings
@ 2019-10-15 10:40 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2019-10-15 10:40 UTC (permalink / raw)
  To: Corentin Labbe
  Cc: devicetree, linux-amlogic, linux-arm-kernel, linux-crypto,
	linux-kernel, davem, herbert, khilman, mark.rutland, robh+dt,
	martin.blumenstingl

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(-)

--- 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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-15 10:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 10:40 [PATCH] crypto: amlogic: fix devm_platform_ioremap_resource.cocci warnings Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).