Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6732399ybn; Mon, 30 Sep 2019 02:53:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxqgXMQCbcNr/yd1hs9BC2DCircQ5LJfTe9IWnIx6Vbu0fiVe4RxTCbWMO1erZN5faQlUF X-Received: by 2002:a05:6402:1202:: with SMTP id c2mr17981969edw.190.1569837223540; Mon, 30 Sep 2019 02:53:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569837223; cv=none; d=google.com; s=arc-20160816; b=rR6QWcOHMMp3yE7TB6aA7Pi1yGZPT8Uk2Zv0OuMqed3+6Iu0PEJsWeiOr9v4JpWncA gXTjDo1fqual2TSNKlSJFb2V9MuOF0DPjoF5JB5qEqyqduZoaF4j9ew1cSu333dtdJYM BYzJ9rjAYGHbPSJJrmNdYzPfcvDk9yMU5S8BXkh1tZRTRC/oi6HC1U2CSPyg8EFwS3il 8mOFEy9EcScjLqV3ISDxUbPYmgZzM9N5AJQ/J7uKQz3UHCrZdvLJf7mLEjaXkth/YR7E MuuUq45/orM+Oc34At1hVZfCoUVLjqA06KWE7FKJVod2IEpBYI5x6p7qAW6pPNADghmc ElMQ== 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=738aiD7ekR64opLPgeLVr0YaDKexXEabE3782WJm4F0=; b=xP+yuIUGKxx1hQ/dgjnAh5XnHA36vDl+tEyKDBqUKXuSH56LoDmmn/7Dteygs/9oKo zqYJpAzXNQQVl0LlgWhu3riKkXgOKD0xwT3vBpNdW+7CzJnbemahrLfBcvJRbiNEnFD3 GiLXboZ2fk0ZONsv5mKJSHZHo8sypcv7zdu7i4AQ8fQCpg5W8mlukiwRtltqUr8iwCgR qAipyEbORsk40UhRD0utJm72SNWgZEWY4G0QIcoTkA0havYyzXNBhKWA8O+GAB14A3qd xawIm+iH1K9bIYnx+NwOracvBYPmYVbY8ZGpCu+TisXv2RlzeL6k95NksnYafFcQ1T5H dIyw== 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 b15si6522701edm.395.2019.09.30.02.53.19; Mon, 30 Sep 2019 02:53:43 -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 S1730610AbfI3JtX (ORCPT + 99 others); Mon, 30 Sep 2019 05:49:23 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:3235 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728581AbfI3JtW (ORCPT ); Mon, 30 Sep 2019 05:49:22 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 4A6D356F2F55C9DA981A; Mon, 30 Sep 2019 17:49:20 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Mon, 30 Sep 2019 17:49:11 +0800 From: YueHaibing To: , , CC: , , , YueHaibing Subject: [PATCH -next] can: grcan: use devm_platform_ioremap_resource() to simplify code Date: Mon, 30 Sep 2019 17:49:09 +0800 Message-ID: <20190930094909.49672-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. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/net/can/grcan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c index b8f1f2b69dd3..378200b682fa 100644 --- a/drivers/net/can/grcan.c +++ b/drivers/net/can/grcan.c @@ -1652,7 +1652,6 @@ static int grcan_setup_netdev(struct platform_device *ofdev, static int grcan_probe(struct platform_device *ofdev) { struct device_node *np = ofdev->dev.of_node; - struct resource *res; u32 sysid, ambafreq; int irq, err; void __iomem *base; @@ -1672,8 +1671,7 @@ static int grcan_probe(struct platform_device *ofdev) goto exit_error; } - res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&ofdev->dev, res); + base = devm_platform_ioremap_resource(ofdev, 0); if (IS_ERR(base)) { err = PTR_ERR(base); goto exit_error; -- 2.20.1