Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7039878ybh; Thu, 8 Aug 2019 09:18:12 -0700 (PDT) X-Received: by 2002:a17:902:1e6:: with SMTP id b93mr14284495plb.295.1565280852879; Thu, 08 Aug 2019 09:14:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgR7pyGRXdqd4D3kHcWX4io1+rxAVOWoj3xwtG0WfJXEz8AJ0Vz06zQcMvFFuAUj1NKN+1 X-Received: by 2002:a17:902:1e6:: with SMTP id b93mr14284453plb.295.1565280852253; Thu, 08 Aug 2019 09:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565280852; cv=none; d=google.com; s=arc-20160816; b=szL+D9kbOVqzu58ZW2Q+eD6mMppze3xGcyR+iO21hm4kPT0RnVhU3tsao9f8QPxA6B 4cifisb+q474oLNKGx4EE1gVdyL9zf2hPlslDHeyMTX79P100Z7DkSKJ9YlwpGpP3phg /MORGopC1XWxKl3Eg5wFBOioJVokWJSXd9ZUgM3vxiiSAU9ahQqBbWLWkNgTwbplYslU IMh8COY3WjkhQXNZC6kzVaBd+sgH433/wRVgVpaqP2DJjIBl2OMs200UIyH4fmEMeMoM KlzMc/NOOaP21KoFEzNVBtN9Vfr5y2rBELgFgOoKD6gxuS4CHHZmQBKHzE43gC9hAXjp p+pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=/QrxR/O4rOUFKE1LCyADlLEXaDFj1lC8j0tUkWhDGao=; b=Je1AbcxDXGxxMsJ9bTi7oeyKlH0y6OvplbZZ3PuZYJqr1YtOjQ+Xv4fwcHWjOGqJbX uHG54LByccCqRQGHHqgV6is0hmSizO02NqZIWHMeif2Y17wYmCruGekRmMDtndD0sR1e PbMZTY+Mp2AyoGWbP93H6O3wjd8hZhV9I/Jj+BTNop6XlxOlSklJ1oNxzeNcYFxse7k8 Mx3qdGqExMhwyxQnniLOI7Km26WDwqVWCDOJ17Kbv05AwcaSmw4OYkWdLW3RlEs+8RvS 3ZLfRJrNG1WGgN5rxB+m/1GBKPHbg06Q+Zs2Lvt6a2BwlYwjW79BAu61tLQn8WfsE94j b7BA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f59si53300119plf.220.2019.08.08.09.13.55; Thu, 08 Aug 2019 09:14:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404125AbfHHQKz (ORCPT + 99 others); Thu, 8 Aug 2019 12:10:55 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:33963 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725535AbfHHQKz (ORCPT ); Thu, 8 Aug 2019 12:10:55 -0400 X-IronPort-AV: E=Sophos;i="5.64,362,1559512800"; d="scan'208";a="315952490" 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; 08 Aug 2019 18:10:53 +0200 Date: Thu, 8 Aug 2019 18:10:53 +0200 (CEST) From: Julia Lawall X-X-Sender: julia@hadrien To: Jonas Gorski cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Michael Turquette , Philippe Mathieu-Daud?? , Florian Fainelli , Stephen Boyd , linux-kernel@vger.kernel.org, kbuild-all@01.org Subject: [PATCH] clk: fix devm_platform_ioremap_resource.cocci warnings Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kbuild test robot drivers/clk/bcm/clk-bcm63xx-gate.c:174:1-9: WARNING: Use devm_platform_ioremap_resource for hw -> regs 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: 1c099779c1e2 ("clk: add BCM63XX gated clock controller driver") CC: Jonas Gorski Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master head: ecb095bff5d4b8711a81968625b3b4a235d3e477 commit: 1c099779c1e2e8e0e10cdb2aecd4b35f428e9f00 clk: add BCM63XX gated clock controller driver :::::: branch date: 15 hours ago :::::: commit date: 6 weeks ago clk-bcm63xx-gate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/clk/bcm/clk-bcm63xx-gate.c +++ b/drivers/clk/bcm/clk-bcm63xx-gate.c @@ -146,7 +146,6 @@ static int clk_bcm63xx_probe(struct plat { const struct clk_bcm63xx_table_entry *entry, *table; struct clk_bcm63xx_hw *hw; - struct resource *r; u8 maxbit = 0; int i, ret; @@ -170,8 +169,7 @@ static int clk_bcm63xx_probe(struct plat for (i = 0; i < maxbit; i++) hw->data.hws[i] = ERR_PTR(-ENODEV); - r = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hw->regs = devm_ioremap_resource(&pdev->dev, r); + hw->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(hw->regs)) return PTR_ERR(hw->regs);