From: Jaehoon Chung <jh80.chung@samsung.com>
To: linux-pci@vger.kernel.org
Cc: bhelgaas@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 <jh80.chung@samsung.com>
Subject: [PATCH V3 3/5] PCI: exynos: Remove the unnecessary variables
Date: Mon, 16 Jan 2017 15:31:36 +0900 [thread overview]
Message-ID: <20170116063138.25805-4-jh80.chung@samsung.com> (raw)
In-Reply-To: <20170116063138.25805-1-jh80.chung@samsung.com>
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
next prev parent reply other threads:[~2017-01-16 6:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170116063140epcas5p38fffe5effdcfd2650cad98c25c31335e@epcas5p3.samsung.com>
2017-01-16 6:31 ` [PATCH V3 0/5] PCI: exynos: cleans the minor things Jaehoon Chung
[not found] ` <CGME20170116063141epcas1p3defd18e3c6440d3e55adadd86c920a41@epcas1p3.samsung.com>
2017-01-16 6:31 ` [PATCH V3 1/5] PCI: exynos: Rename all pointer names from "exynos_pcie" to "ep" Jaehoon Chung
[not found] ` <CGME20170116063141epcas5p30c3b6fa57b7ef053dbe3755e1f44fd8c@epcas5p3.samsung.com>
2017-01-16 6:31 ` [PATCH V3 2/5] PCI: exynos: Replace the *_blk/*_phy/*_elb accessors Jaehoon Chung
[not found] ` <CGME20170116063141epcas5p329a9496aabe28a9961176539c47065dc@epcas5p3.samsung.com>
2017-01-16 6:31 ` Jaehoon Chung [this message]
[not found] ` <CGME20170116063141epcas5p3717d40cea33d34b715b6c0016c10ab16@epcas5p3.samsung.com>
2017-01-16 6:31 ` [PATCH V3 4/5] PCI: exynos: Use the bitops API to operate the bit shifting Jaehoon Chung
[not found] ` <CGME20170116063142epcas1p32d52a367a66410206b3ddb4149fde079@epcas1p3.samsung.com>
2017-01-16 6:31 ` [PATCH V3 5/5] PCI: exynos: remove the duplicated codes Jaehoon Chung
2017-01-28 21:27 ` [PATCH V3 0/5] PCI: exynos: cleans the minor things Bjorn Helgaas
2017-01-31 21:16 ` Jingoo Han
2017-01-31 23:41 ` Jaehoon Chung
2017-02-08 19:42 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170116063138.25805-4-jh80.chung@samsung.com \
--to=jh80.chung@samsung.com \
--cc=bhelgaas@google.com \
--cc=cpgs@samsung.com \
--cc=javier@osg.samsung.com \
--cc=jingoohan1@gmail.com \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®