Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp76991ybl; Fri, 9 Aug 2019 02:46:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUqQdUz1UZ38BP11mLrONR1rGS3DgEkrEY9lcCp6g0iESb65HicOl0Oh5sPYDuhA46JpsN X-Received: by 2002:a17:902:d892:: with SMTP id b18mr16979924plz.165.1565344017084; Fri, 09 Aug 2019 02:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565344017; cv=none; d=google.com; s=arc-20160816; b=FW3X+C/30iBtTrlCnaFedA0Ab9pW1JKbLp0/sPAIyh0OmH7Xxm6Kg1lFQndULaZbrO B72libuvSJ1hkiDGOhIgBROx4NX+gcoRxkzx1bq7vHtoddWXahWrggDHj4eZLjYjtrie GzGOPq8KogWG6nKpp9bvcssF9GLGEFkxv245VlxhC0DTV++uA8q4H7grSduencKuqmrl 9Op9k7XEaqmYpbe+F8mf7mL2AYEeQQKKmgpSmOzu2SesRHc3LNMGP1I8GdjnNVAaQQR9 g5TcDBi0x6cix+5JPgT3kFx2sQuUXUmFYfzjs8B9I44v37RI4mMthRe1VzQPrTpkkoFi BI3w== 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=nhBjpQgbOTNx+8S1DkZpZx9wAPgq3xD5tXg5b2dAuzo=; b=erbhBSIg8w8ChwM4SeQV5Mvdt4ocrn5yoA0lthsCPgkKMjYnnRjQxKywgP4OMvGSrW ML5sx6vLAqs42y6TZlncSRAhXRWFhVkYy1rQ6SVFj/OAq+iEwS5NyCvJdh7vwzMQqhNY IKtkZlYLZL90WXR1fDj3N86Ogqb6UYMSFLPW7IGew9LIGLAqMFBNU6mO4vbMg7xVlzzo QfskkZl2Q22Nt6wjWWZ+JAs9tyk3i4qtPksPAPBn15ehwrCa5Sl0OjSnZLm7kMznSPUo KA9diInmmYzpw6xtd2cLnMlnKUNys+WkTeEungautV52lrMNrLtyor9HyBr9CqmRr60W XnHQ== 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 k33si56752259pgi.563.2019.08.09.02.46.40; Fri, 09 Aug 2019 02:46:57 -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 S2406111AbfHIJlW (ORCPT + 99 others); Fri, 9 Aug 2019 05:41:22 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:26600 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbfHIJlW (ORCPT ); Fri, 9 Aug 2019 05:41:22 -0400 X-IronPort-AV: E=Sophos;i="5.64,364,1559512800"; d="scan'208";a="316002950" 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; 09 Aug 2019 11:41:19 +0200 Date: Fri, 9 Aug 2019 11:41:19 +0200 (CEST) From: Julia Lawall X-X-Sender: julia@hadrien To: David Lechner cc: William Breathitt Gray , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild-all@01.org Subject: [PATCH] counter: 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=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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: 78958c294246 ("counter: new TI eQEP driver") Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- tree: https://github.com/dlech/linux bone-counter head: 669cef0feba0b11f271f462c4d26e4d1449a9db8 commit: 78958c294246fe1177ff62518eef45d20ad0165e [5/8] counter: new TI eQEP driver :::::: branch date: 2 days ago :::::: commit date: 2 days ago Despite the fixes tag, this is not actually fixing a bug, it just makes the code a little shorter. ti-eqep.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/counter/ti-eqep.c +++ b/drivers/counter/ti-eqep.c @@ -392,15 +392,13 @@ static int ti_eqep_probe(struct platform { struct device *dev = &pdev->dev; struct ti_eqep_cnt *priv; - struct resource *res; void __iomem *base; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base);