From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25A8FC31E40 for ; Fri, 9 Aug 2019 09:41:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE17020B7C for ; Fri, 9 Aug 2019 09:41:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406156AbfHIJlW (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 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);