From patchwork Mon Dec 19 08:16:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 9479833 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DAD1360772 for ; Mon, 19 Dec 2016 08:17:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9F3128457 for ; Mon, 19 Dec 2016 08:17:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEC3C2845E; Mon, 19 Dec 2016 08:17:18 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 780742845D for ; Mon, 19 Dec 2016 08:17:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754810AbcLSIQY (ORCPT ); Mon, 19 Dec 2016 03:16:24 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:39068 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbcLSIQW (ORCPT ); Mon, 19 Dec 2016 03:16:22 -0500 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OIF02XBUAYX0M90@mailout2.samsung.com>; Mon, 19 Dec 2016 17:16:16 +0900 (KST) X-AuditID: cbfee61b-f79d86d00000197e-08-58579750a70a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 3A.E4.06526.05797585; Mon, 19 Dec 2016 17:16:16 +0900 (KST) Received: from localhost.localdomain ([10.113.62.216]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OIF0065CAZ4L410@mmp2.samsung.com>; Mon, 19 Dec 2016 17:16:16 +0900 (KST) From: Jaehoon Chung To: linux-pci@vger.kernel.org Cc: helgaas@google.com, krzk@kernel.org, linux-kernel@vger.kernel.org, jingoohan1@gmail.com, javier@osg.samsung.com, kgene@kernel.org, linux-samsung-soc@vger.kernel.org, Jaehoon Chung Subject: [PATCH 2/4] PCI: exynos: Remove the unnecessary variables Date: Mon, 19 Dec 2016 17:16:12 +0900 Message-id: <20161219081614.5403-3-jh80.chung@samsung.com> X-Mailer: git-send-email 2.10.2 In-reply-to: <20161219081614.5403-1-jh80.chung@samsung.com> References: <20161219081614.5403-1-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrDLMWRmVeSWpSXmKPExsVy+t9jQd2A6eERBu0zLS1mPd/DavHm7Rom ixu/2lgtVnyZyW7R//g1s8X58xvYLS7vmsNmcXbecTaLGef3MTlweuycdZfdY8GmUo9NqzrZ PLb0A3l9W1YxenzeJBfAFuVmk5GamJJapJCal5yfkpmXbqsUGuKma6GkkJeYm2qrFKHrGxKk pFCWmFMK5BkZoAEH5wD3YCV9uwS3jGkLf7IUnBCo2Ng3g7mBcQJfFyMnh4SAicS5qc/YIWwx iQv31rN1MXJxCAnMYpRoXj6NCcL5wShxpX0WG0gVm4COxPZvx5lAbBEBWYmPl/eAdTALXGGU eDr3AAtIQljASeL15T5GEJtFQFVi6fWVYM28AlYST/fPZYFYJy+x8PwRsEGcAtYSExd/YAax hYBq1q6+wDyBkXcBI8MqRonUguSC4qT0XKO81HK94sTc4tK8dL3k/NxNjOCQfya9g/HwLvdD jAIcjEo8vBO4wyOEWBPLiitzDzFKcDArifA6TgYK8aYkVlalFuXHF5XmpBYfYjQFOmwis5Ro cj4wHvNK4g1NzE3MjQ0szC0tTYyUxHkbZz8LFxJITyxJzU5NLUgtgulj4uCUamDkzjTUPPhQ pqpRU7ZQ21WouHJhYu5GqZOih9w7t95b+cVIQuUc/4Yg5VrvtMmBvS+q0g/4nM87psR8geV6 VrPuD7W12y9sDktMX85cGXGyxOr0NC0RBq2dpczSN57oVq0oNhD/UeRVoMmiUxXJdlwlRdW0 6+KbjcdZlNd0rQpMz/9jFJTlocRSnJFoqMVcVJwIAEDvI+ePAgAA X-MTR: 20000000000000000@CPGS Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove the unnecessary variables(elbi/phy/block_base). It needs one resource structure for assigning each resource. So it replaces with one 'res' variable. Signed-off-by: Jaehoon Chung --- drivers/pci/host/pci-exynos.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c index 6dbfa2c..d64e8f1 100644 --- a/drivers/pci/host/pci-exynos.c +++ b/drivers/pci/host/pci-exynos.c @@ -509,9 +509,7 @@ static int __init exynos_pcie_probe(struct platform_device *pdev) struct exynos_pcie *exynos_pcie; struct pcie_port *pp; struct device_node *np = dev->of_node; - struct resource *elbi_base; - struct resource *phy_base; - struct resource *block_base; + struct resource *res; int ret; exynos_pcie = devm_kzalloc(dev, sizeof(*exynos_pcie), GFP_KERNEL); @@ -542,22 +540,22 @@ static int __init exynos_pcie_probe(struct platform_device *pdev) if (ret) goto fail_clk; - elbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0); - exynos_pcie->elbi_base = devm_ioremap_resource(dev, elbi_base); + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + exynos_pcie->elbi_base = devm_ioremap_resource(dev, res); if (IS_ERR(exynos_pcie->elbi_base)) { ret = PTR_ERR(exynos_pcie->elbi_base); goto fail_bus_clk; } - phy_base = platform_get_resource(pdev, IORESOURCE_MEM, 1); - exynos_pcie->phy_base = devm_ioremap_resource(dev, phy_base); + res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + exynos_pcie->phy_base = devm_ioremap_resource(dev, res); if (IS_ERR(exynos_pcie->phy_base)) { ret = PTR_ERR(exynos_pcie->phy_base); goto fail_bus_clk; } - block_base = platform_get_resource(pdev, IORESOURCE_MEM, 2); - exynos_pcie->block_base = devm_ioremap_resource(dev, block_base); + res = platform_get_resource(pdev, IORESOURCE_MEM, 2); + exynos_pcie->block_base = devm_ioremap_resource(dev, res); if (IS_ERR(exynos_pcie->block_base)) { ret = PTR_ERR(exynos_pcie->block_base); goto fail_bus_clk;