From patchwork Tue Sep 10 10:03:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 11139135 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 A21C01395 for ; Tue, 10 Sep 2019 10:03:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 89B962067B for ; Tue, 10 Sep 2019 10:03:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405387AbfIJKDP (ORCPT ); Tue, 10 Sep 2019 06:03:15 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:49194 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391953AbfIJKDP (ORCPT ); Tue, 10 Sep 2019 06:03:15 -0400 X-IronPort-AV: E=Sophos;i="5.64,489,1559512800"; d="scan'208";a="318879002" 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; 10 Sep 2019 12:03:13 +0200 Date: Tue, 10 Sep 2019 12:03:14 +0200 (CEST) From: Julia Lawall X-X-Sender: julia@hadrien To: jassisinghbrar@gmail.com cc: dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, robh+dt@kernel.org, masami.hiramatsu@linaro.org, orito.takao@socionext.com, Jassi Brar , kbuild-all@01.org Subject: [PATCH] dmaengine: milbeaut-hdmac: fix devm_platform_ioremap_resource.cocci warnings Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org From: kbuild test robot 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: 7cff81f3886d ("dmaengine: milbeaut-hdmac: Add HDMAC driver for Milbeaut platforms") CC: Jassi Brar Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- url: https://github.com/0day-ci/linux/commits/jassisinghbrar-gmail-com/Add-support-for-AHB-DMA-controller-on-Milbeaut-series/20190910-142047 :::::: branch date: 2 hours ago :::::: commit date: 2 hours ago Please take the patch only if it's a positive warning. Thanks! milbeaut-hdmac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/dma/milbeaut-hdmac.c +++ b/drivers/dma/milbeaut-hdmac.c @@ -461,7 +461,6 @@ static int milbeaut_hdmac_probe(struct p struct device *dev = &pdev->dev; struct milbeaut_hdmac_device *mdev; struct dma_device *ddev; - struct resource *res; int nr_chans, ret, i; nr_chans = platform_irq_count(pdev); @@ -477,8 +476,7 @@ static int milbeaut_hdmac_probe(struct p if (!mdev) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mdev->reg_base = devm_ioremap_resource(dev, res); + mdev->reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mdev->reg_base)) return PTR_ERR(mdev->reg_base);