From patchwork Mon Dec 19 08:17:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 9479835 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 0E92460772 for ; Mon, 19 Dec 2016 08:17:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3F4728343 for ; Mon, 19 Dec 2016 08:17:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8D23283B9; Mon, 19 Dec 2016 08:17:52 +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=ham 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 7DC1228343 for ; Mon, 19 Dec 2016 08:17:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932866AbcLSIRs (ORCPT ); Mon, 19 Dec 2016 03:17:48 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:36100 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932849AbcLSIRr (ORCPT ); Mon, 19 Dec 2016 03:17:47 -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 <0OIF000COB1DI870@mailout2.samsung.com>; Mon, 19 Dec 2016 17:17:42 +0900 (KST) X-AuditID: cbfee61b-f79d86d00000197e-9e-585797a6b12d Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 82.05.06526.6A797585; Mon, 19 Dec 2016 17:17:42 +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 <0OIF0068CB1HL410@mmp2.samsung.com>; Mon, 19 Dec 2016 17:17:42 +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, cpgs@samsung.com, Jaehoon Chung Subject: [PATCH 2/4] PCI: exynos: Remove the unnecessary variables Date: Mon, 19 Dec 2016 17:17:38 +0900 Message-id: <20161219081740.5457-3-jh80.chung@samsung.com> X-Mailer: git-send-email 2.10.2 In-reply-to: <20161219081740.5457-1-jh80.chung@samsung.com> References: <20161219081740.5457-1-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHLMWRmVeSWpSXmKPExsVy+t9jQd1l08MjDM4sELB4eUjTYtbzPawW b96uYbK48auN1WLFl5nsFv2PXzNbnD+/gd3i8q45bBZn5x1ns5hxfh+TA5fHzll32T0WbCr1 2LSqk81jSz+Q17dlFaPH501yAWxRbjYZqYkpqUUKqXnJ+SmZeem2SqEhbroWSgp5ibmptkoR ur4hQUoKZYk5pUCekQEacHAOcA9W0rdLcMuYtvAnS8EJgYqNfTOYGxgn8HUxcnJICJhI3D59 ih3CFpO4cG89WxcjF4eQwCxGiZP7pjFBOD8YJTau+sYKUsUmoCOx/dtxJhBbREBW4uPlPWwg NrPAC0aJz8skQWxhASeJ15f7GLsYOThYBFQlWg+ZgoR5Bawk1t4/xwSxTF5i4fkjYDangLXE 9T1rwcYLAdU8nvuQZQIj7wJGhlWMEqkFyQXFSem5Rnmp5XrFibnFpXnpesn5uZsYwWH/THoH 4+Fd7ocYBTgYlXh4J3CHRwixJpYVV+YeYpTgYFYS4XWcDBTiTUmsrEotyo8vKs1JLT7EaAp0 10RmKdHkfGBM5pXEG5qYm5gbG1iYW1qaGCmJ8zbOfhYuJJCeWJKanZpakFoE08fEwSnVwJjb rfz80ckN+4uWzkz4m223U37ZxEv6SnPj78jHPtMv+fan+Fea8CZXjVM/xfc5c81bcsyYqSk3 T/PqF7cdzypav0wX/Gsc+02neMlMDnfnC89/XQk+cEKsScPRwpJllt2mjR/nlyisZ/uVWFZq 6Trx+79jrKKpgscLZybPjzm+suhSuMalVzuUWIozEg21mIuKEwGaHaANkQIAAA== 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 Reviewed-by: Pankaj Dubey Acked-by: Krzysztof Kozlowski --- 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;