Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932930AbcLSIRt (ORCPT ); Mon, 19 Dec 2016 03:17:49 -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 X-AuditID: cbfee61b-f79d86d00000197e-9e-585797a6b12d 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2063 Lines: 55 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; -- 2.10.2