Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5945832ybp; Tue, 15 Oct 2019 07:23:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZUMTEtiiJf0MzG5I0ESm7PAJuPW7T8WH2wRCzWDyrBQYbayhKcIB180z9ceINg2A2m91I X-Received: by 2002:a17:906:6d82:: with SMTP id h2mr34437705ejt.127.1571149404412; Tue, 15 Oct 2019 07:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571149404; cv=none; d=google.com; s=arc-20160816; b=L6FmIJwyDHD93SyOs78+9heiXCVJZvJF5MWn6TOur45JNeQkWRkEZ/nf3YK3wNWKLC cqrxi24RfJmiw+gcCo9mQBB0TVwl+nyIcED7Oodud189l8Q6A21TlZYAkatw9mN0enVg TeZYQUUyrXFkVfYJtuCgm1pqy0xOXhlmDQs+HI6cUfN1JqtVyamoy0we6tIFwX0ZVDOj LU6RXOj1ZSegg7pdyJ/s29F0wKCyNsg6g7YKFvuseDdMTEgJRY130/7zHwvzM30sq5ku G3psKrxz3UtdyED9dIrlOPFSDiSl7uL83OdRb9NqbHDRUsj9a63QyE00b9SIltkJ0fFj bQxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=cAtr8GF5XV4++AxTPCtu+FJppytpkQTOje5hQYSnV+I=; b=YK7IE9q6luS+8bbYiAkDl3bEKDoIm2RqTr2WGa1lL7bn3iMOfjOXwHWFoQfXwGmGIw hrDhQ2SxDjJMjw+9PzfwwMTLkuPOqoZY/obuFJBcXAwWXuKZjulXPLV6ze8B02Nh+wdh FjeHy95M+fWiZyfaOd0aekOFZ2XWUs7Xa1E+CJdM2OgZdX6lk3CEqzrkex4MGrKCpCZp yI32PqBxYMFftU+mfTQBVmy4H7lrW9MVvmE69pYZ3AAdik8SQ1qq/loXFYMbKNy0nP8h Bts2NASGS1T9btcEW7OCXOtvl77o2zZVckBmhP8uXiXyJXaIOzuN8bPfB/WRJ9GEozag VoMg== 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 g3si12857080edu.432.2019.10.15.07.23.00; Tue, 15 Oct 2019 07:23:24 -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 S1732546AbfJOOVT (ORCPT + 99 others); Tue, 15 Oct 2019 10:21:19 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:39948 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732394AbfJOOVT (ORCPT ); Tue, 15 Oct 2019 10:21:19 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 473981E75273BD38DDBC; Tue, 15 Oct 2019 22:21:16 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 15 Oct 2019 22:21:09 +0800 From: YueHaibing To: , , , CC: , , Subject: [PATCH net-next] can: ifi: use devm_platform_ioremap_resource() to simplify code Date: Tue, 15 Oct 2019 22:20:46 +0800 Message-ID: <20191015142046.24844-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing --- drivers/net/can/ifi_canfd/ifi_canfd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/can/ifi_canfd/ifi_canfd.c b/drivers/net/can/ifi_canfd/ifi_canfd.c index fedd927..04d59be 100644 --- a/drivers/net/can/ifi_canfd/ifi_canfd.c +++ b/drivers/net/can/ifi_canfd/ifi_canfd.c @@ -942,13 +942,11 @@ static int ifi_canfd_plat_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct net_device *ndev; struct ifi_canfd_priv *priv; - struct resource *res; void __iomem *addr; int irq, ret; u32 id, rev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - addr = devm_ioremap_resource(dev, res); + addr = devm_platform_ioremap_resource(pdev, 0); irq = platform_get_irq(pdev, 0); if (IS_ERR(addr) || irq < 0) return -EINVAL; -- 2.7.4