Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp731562ybe; Wed, 4 Sep 2019 07:00:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzYsDHre9uFfr6x/ML5auLhBeSyY3n6vJ27oI0YzHnbvUqMPYPMMvV9QEwFkxAQV6iFneMK X-Received: by 2002:a17:902:8a93:: with SMTP id p19mr41368582plo.106.1567605658338; Wed, 04 Sep 2019 07:00:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567605658; cv=none; d=google.com; s=arc-20160816; b=lw92yRp9eDmc1s0morOA1Iu/bSRHAY7H8VAjFwURudptusCAGQ7ShpV8fizZwbANkA yIMaACZ9vAQZrWubw9aFuFkmbtgVlG3kDEPFFR3Fqr3xsc3V0ujjbzPxqKY9v7VKjoQy H0GDUiwQAH7DyJpcTBuek7pbs/BgIB2IwryqWGVnrVDCFD9965vYgIB2mppIts6kL1Y+ khX/kZqV8XFn+pqTzw99zFtN0UxjgfXOqqYZa5NInM3y8FmXMWMSdJPcYO01hRoe9OiZ LMjJMIWiev25ePKnhJYVDYRmwXySFZX8VJ5buOBdLDWAA+I0b/l9nL0Cy8w/LkHiA9qD 2Z9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=GosN9sE9TEXcyTrKEbvK3hRg3qYLzTtrtOh7qyP2tGM=; b=dRareVH/u4Ew9Bn/L7exRuNVkFqJo4xSSXNxknseccMdWU7JhDDHF5v1LglntLObTf som7WNm0snn+c85f6SkAPu5KO9TYrHehIgRtQhYWY89mYb6xJ9QNv5hpniNlSv+TnBvG lUNCafnoFHw8y8QoDE06KBad4/hT8GAJYWyR6QhEeKYjY/m6beRyemDiwtFXwj3A70O1 oYfg8iBgRq0/FW+SyCn0rVLgOKu3FDXp3ZTJN9yAR0DV/lJAI3+w2FM/3xeD6fJcCzpF vQsPCCuEpUjWTRdq5JNTwCmYCmXEuJ5oxFvSfBpOTn0izdNRA7bFP3TGLpt38qsnWy/B 6ToA== 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 s22si4470031plq.162.2019.09.04.07.00.42; Wed, 04 Sep 2019 07:00:58 -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 S1730576AbfIDN7o (ORCPT + 99 others); Wed, 4 Sep 2019 09:59:44 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5766 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730529AbfIDN7n (ORCPT ); Wed, 4 Sep 2019 09:59:43 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E874BB639D651121E52E; Wed, 4 Sep 2019 21:59:40 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 4 Sep 2019 21:59:34 +0800 From: YueHaibing To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , , , , , YueHaibing Subject: [PATCH -next 02/36] spi: a3700: use devm_platform_ioremap_resource() to simplify code Date: Wed, 4 Sep 2019 21:58:44 +0800 Message-ID: <20190904135918.25352-3-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20190904135918.25352-1-yuehaibing@huawei.com> References: <20190904135918.25352-1-yuehaibing@huawei.com> 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/spi/spi-armada-3700.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c index 119ae87..e450ee1 100644 --- a/drivers/spi/spi-armada-3700.c +++ b/drivers/spi/spi-armada-3700.c @@ -817,7 +817,6 @@ static int a3700_spi_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *of_node = dev->of_node; - struct resource *res; struct spi_master *master; struct a3700_spi *spi; u32 num_cs = 0; @@ -855,8 +854,7 @@ static int a3700_spi_probe(struct platform_device *pdev) spi->master = master; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - spi->base = devm_ioremap_resource(dev, res); + spi->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(spi->base)) { ret = PTR_ERR(spi->base); goto error; -- 2.7.4