lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <20170112021719.24986-2-jh80.chung@samsung.com>
Date:   Thu, 12 Jan 2017 11:17:17 +0900
From:   Jaehoon Chung <jh80.chung@...sung.com>
To:     linux-pci@...r.kernel.org
Cc:     helgaas@...gle.com, krzk@...nel.org, linux-kernel@...r.kernel.org,
        jingoohan1@...il.com, javier@....samsung.com, kgene@...nel.org,
        linux-samsung-soc@...r.kernel.org, cpgs@...sung.com,
        Jaehoon Chung <jh80.chung@...sung.com>
Subject: [PATCH V2 2/4] PCI: exynos: Remove the unnecessary variables

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@...sung.com>
Reviewed-by: Pankaj Dubey <pankaj.dubey@...sung.com>
Acked-by: Krzysztof Kozlowski <krzk@...nel.org>
---
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 92856cd..3a7e09b 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 *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);
@@ -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);
-	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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ