From patchwork Tue Oct 15 10:40:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 11189995 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 22A831668 for ; Tue, 15 Oct 2019 10:40:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02D042067B for ; Tue, 15 Oct 2019 10:40:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730942AbfJOKkp (ORCPT ); Tue, 15 Oct 2019 06:40:45 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:22950 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730937AbfJOKko (ORCPT ); Tue, 15 Oct 2019 06:40:44 -0400 X-IronPort-AV: E=Sophos;i="5.67,299,1566856800"; d="scan'208";a="322757199" Received: from portablejulia.rsr.lip6.fr ([132.227.76.63]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 12:40:42 +0200 Date: Tue, 15 Oct 2019 12:40:42 +0200 (CEST) From: Julia Lawall X-X-Sender: julia@hadrien To: Corentin Labbe cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, herbert@gondor.apana.org.au, khilman@baylibre.com, mark.rutland@arm.com, robh+dt@kernel.org, martin.blumenstingl@googlemail.com Subject: [PATCH] crypto: amlogic: fix devm_platform_ioremap_resource.cocci warnings Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: kbuild test robot 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 Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- 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);