From: kbuild test robot <[email protected]>
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 <[email protected]>
Signed-off-by: kbuild test robot <[email protected]>
Signed-off-by: Julia Lawall <[email protected]>
---
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);