From patchwork Fri Aug 9 09:41:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 11086107 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 120FD14E5 for ; Fri, 9 Aug 2019 09:42:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0158F28C38 for ; Fri, 9 Aug 2019 09:42:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E98A728C5E; Fri, 9 Aug 2019 09:42:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BFA228C38 for ; Fri, 9 Aug 2019 09:42:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405724AbfHIJlW (ORCPT ); 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 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);