Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1559466

[PATCH V3 3/5] PCI: exynos: Remove the unnecessary variables

From Jaehoon Chung <jh80.chung@samsung.com>
Newsgroups linux.kernel
Subject [PATCH V3 3/5] PCI: exynos: Remove the unnecessary variables
Date 2017-01-16 07:40 +0100
Message-ID <t097s-4PF-23@gated-at.bofh.it> (permalink)
References <t097r-4PF-3@gated-at.bofh.it> <t097s-4PF-25@gated-at.bofh.it> <t097r-4PF-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <jh80.chung@samsung.com>
Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Changelog on V3:
- None
Changelog on V2:
- None
 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 166881a..6255294 100644
--- a/drivers/pci/host/pci-exynos.c
+++ b/drivers/pci/host/pci-exynos.c
@@ -507,9 +507,7 @@ static int __init exynos_pcie_probe(struct platform_device *pdev)
 	struct exynos_pcie *ep;
 	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;
 
 	ep = devm_kzalloc(dev, sizeof(*ep), GFP_KERNEL);
@@ -540,22 +538,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);
-	ep->elbi_base = devm_ioremap_resource(dev, elbi_base);
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	ep->elbi_base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(ep->elbi_base)) {
 		ret = PTR_ERR(ep->elbi_base);
 		goto fail_bus_clk;
 	}
 
-	phy_base = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	ep->phy_base = devm_ioremap_resource(dev, phy_base);
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+	ep->phy_base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(ep->phy_base)) {
 		ret = PTR_ERR(ep->phy_base);
 		goto fail_bus_clk;
 	}
 
-	block_base = platform_get_resource(pdev, IORESOURCE_MEM, 2);
-	ep->block_base = devm_ioremap_resource(dev, block_base);
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
+	ep->block_base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(ep->block_base)) {
 		ret = PTR_ERR(ep->block_base);
 		goto fail_bus_clk;
-- 
2.10.2

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V3 0/5] PCI: exynos: cleans the minor things Jaehoon Chung <jh80.chung@samsung.com> - 2017-01-16 07:40 +0100
  [PATCH V3 1/5] PCI: exynos: Rename all pointer names from  "exynos_pcie" to "ep" Jaehoon Chung <jh80.chung@samsung.com> - 2017-01-16 07:40 +0100
  [PATCH V3 3/5] PCI: exynos: Remove the unnecessary variables Jaehoon Chung <jh80.chung@samsung.com> - 2017-01-16 07:40 +0100
  [PATCH V3 4/5] PCI: exynos: Use the bitops API to operate the bit  shifting Jaehoon Chung <jh80.chung@samsung.com> - 2017-01-16 07:40 +0100
  [PATCH V3 2/5] PCI: exynos: Replace the *_blk/*_phy/*_elb accessors Jaehoon Chung <jh80.chung@samsung.com> - 2017-01-16 07:40 +0100

csiph-web