Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/7] PCI: layerscape: Cleanups
@ 2016-10-12 13:57 Bjorn Helgaas
  2016-10-12 13:57 ` [PATCH v2 1/7] PCI: layerscape: Add local struct device pointers Bjorn Helgaas
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2016-10-12 13:57 UTC (permalink / raw)
  To: Minghuan Lian, Mingkai Hu, Roy Zang; +Cc: linux-pci, linuxppc-dev

  - Add local "dev" pointers to reduce repetition of things like
    "&pdev->dev".

  - Remove platform drvdata because it appears unused (we called
    platform_set_drvdata() but not platform_get_drvdata()).

  - Remove redundant struct members.

  - Pass device-specific struct to internal functions for consistency.

  - Move struct pcie_port setup to probe function for consistency.

  - Remove unused ls_add_pcie_port() platform_device argument.

Nothing here should change the behavior of the driver.

Changes from v1:
  I dropped the following patch because it was a lot of churn for
  questionable benefit:
    PCI: layerscape: Name private struct pointer "ls" consistently

---

Bjorn Helgaas (7):
      PCI: layerscape: Add local struct device pointers
      PCI: layerscape: Remove unused platform data
      PCI: layerscape: Remove redundant struct ls_pcie.dbi
      PCI: layerscape: Pass device-specific struct to internal functions
      PCI: layerscape: Move struct pcie_port setup to probe function
      PCI: layerscape: Remove unused ls_add_pcie_port() platform_device arg
      PCI: layerscape: Reorder struct ls_pcie


 drivers/pci/host/pci-layerscape.c |   65 +++++++++++++++++++------------------
 1 file changed, 33 insertions(+), 32 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/7] PCI: layerscape: Add local struct device pointers
  2016-10-12 13:57 [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
@ 2016-10-12 13:57 ` Bjorn Helgaas
  2016-10-12 13:57 ` [PATCH v2 2/7] PCI: layerscape: Remove unused platform data Bjorn Helgaas
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2016-10-12 13:57 UTC (permalink / raw)
  To: Minghuan Lian, Mingkai Hu, Roy Zang; +Cc: linux-pci, linuxppc-dev

Use a local "struct device *dev" for brevity and consistency with other
drivers.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-layerscape.c |   26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c
index 114ba81..08b511e 100644
--- a/drivers/pci/host/pci-layerscape.c
+++ b/drivers/pci/host/pci-layerscape.c
@@ -106,18 +106,19 @@ static int ls1021_pcie_link_up(struct pcie_port *pp)
 
 static void ls1021_pcie_host_init(struct pcie_port *pp)
 {
+	struct device *dev = pp->dev;
 	struct ls_pcie *pcie = to_ls_pcie(pp);
 	u32 index[2];
 
-	pcie->scfg = syscon_regmap_lookup_by_phandle(pp->dev->of_node,
+	pcie->scfg = syscon_regmap_lookup_by_phandle(dev->of_node,
 						     "fsl,pcie-scfg");
 	if (IS_ERR(pcie->scfg)) {
-		dev_err(pp->dev, "No syscfg phandle specified\n");
+		dev_err(dev, "No syscfg phandle specified\n");
 		pcie->scfg = NULL;
 		return;
 	}
 
-	if (of_property_read_u32_array(pp->dev->of_node,
+	if (of_property_read_u32_array(dev->of_node,
 				       "fsl,pcie-scfg", index, 2)) {
 		pcie->scfg = NULL;
 		return;
@@ -158,8 +159,9 @@ static void ls_pcie_host_init(struct pcie_port *pp)
 static int ls_pcie_msi_host_init(struct pcie_port *pp,
 				 struct msi_controller *chip)
 {
+	struct device *dev = pp->dev;
+	struct device_node *np = dev->of_node;
 	struct device_node *msi_node;
-	struct device_node *np = pp->dev->of_node;
 
 	/*
 	 * The MSI domain is set by the generic of_msi_configure().  This
@@ -169,7 +171,7 @@ static int ls_pcie_msi_host_init(struct pcie_port *pp,
 	 */
 	msi_node = of_parse_phandle(np, "msi-parent", 0);
 	if (!msi_node) {
-		dev_err(pp->dev, "failed to find msi-parent\n");
+		dev_err(dev, "failed to find msi-parent\n");
 		return -EINVAL;
 	}
 
@@ -215,16 +217,17 @@ static const struct of_device_id ls_pcie_of_match[] = {
 static int __init ls_add_pcie_port(struct pcie_port *pp,
 				   struct platform_device *pdev)
 {
+	struct device *dev = &pdev->dev;
 	int ret;
 	struct ls_pcie *pcie = to_ls_pcie(pp);
 
-	pp->dev = &pdev->dev;
+	pp->dev = dev;
 	pp->dbi_base = pcie->dbi;
 	pp->ops = pcie->drvdata->ops;
 
 	ret = dw_pcie_host_init(pp);
 	if (ret) {
-		dev_err(pp->dev, "failed to initialize host\n");
+		dev_err(dev, "failed to initialize host\n");
 		return ret;
 	}
 
@@ -233,23 +236,24 @@ static int __init ls_add_pcie_port(struct pcie_port *pp,
 
 static int __init ls_pcie_probe(struct platform_device *pdev)
 {
+	struct device *dev = &pdev->dev;
 	const struct of_device_id *match;
 	struct ls_pcie *pcie;
 	struct resource *dbi_base;
 	int ret;
 
-	match = of_match_device(ls_pcie_of_match, &pdev->dev);
+	match = of_match_device(ls_pcie_of_match, dev);
 	if (!match)
 		return -ENODEV;
 
-	pcie = devm_kzalloc(&pdev->dev, sizeof(*pcie), GFP_KERNEL);
+	pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL);
 	if (!pcie)
 		return -ENOMEM;
 
 	dbi_base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
-	pcie->dbi = devm_ioremap_resource(&pdev->dev, dbi_base);
+	pcie->dbi = devm_ioremap_resource(dev, dbi_base);
 	if (IS_ERR(pcie->dbi)) {
-		dev_err(&pdev->dev, "missing *regs* space\n");
+		dev_err(dev, "missing *regs* space\n");
 		return PTR_ERR(pcie->dbi);
 	}
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/7] PCI: layerscape: Remove unused platform data
  2016-10-12 13:57 [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
  2016-10-12 13:57 ` [PATCH v2 1/7] PCI: layerscape: Add local struct device pointers Bjorn Helgaas
@ 2016-10-12 13:57 ` Bjorn Helgaas
  2016-10-12 13:57 ` [PATCH v2 3/7] PCI: layerscape: Remove redundant struct ls_pcie.dbi Bjorn Helgaas
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2016-10-12 13:57 UTC (permalink / raw)
  To: Minghuan Lian, Mingkai Hu, Roy Zang; +Cc: linux-pci, linuxppc-dev

The layerscape driver never uses the platform drvdata pointer, so don't
bother setting it.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-layerscape.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c
index 08b511e..ebed415 100644
--- a/drivers/pci/host/pci-layerscape.c
+++ b/drivers/pci/host/pci-layerscape.c
@@ -267,8 +267,6 @@ static int __init ls_pcie_probe(struct platform_device *pdev)
 	if (ret < 0)
 		return ret;
 
-	platform_set_drvdata(pdev, pcie);
-
 	return 0;
 }
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/7] PCI: layerscape: Remove redundant struct ls_pcie.dbi
  2016-10-12 13:57 [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
  2016-10-12 13:57 ` [PATCH v2 1/7] PCI: layerscape: Add local struct device pointers Bjorn Helgaas
  2016-10-12 13:57 ` [PATCH v2 2/7] PCI: layerscape: Remove unused platform data Bjorn Helgaas
@ 2016-10-12 13:57 ` Bjorn Helgaas
  2016-10-12 13:57 ` [PATCH v2 4/7] PCI: layerscape: Pass device-specific struct to internal functions Bjorn Helgaas
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2016-10-12 13:57 UTC (permalink / raw)
  To: Minghuan Lian, Mingkai Hu, Roy Zang; +Cc: linux-pci, linuxppc-dev

Remove the struct ls_pcie.dbi member, which is a duplicate of the generic
pp.dbi_base member.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-layerscape.c |   24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c
index ebed415..bdafe55 100644
--- a/drivers/pci/host/pci-layerscape.c
+++ b/drivers/pci/host/pci-layerscape.c
@@ -45,7 +45,6 @@ struct ls_pcie_drvdata {
 };
 
 struct ls_pcie {
-	void __iomem *dbi;
 	void __iomem *lut;
 	struct regmap *scfg;
 	struct pcie_port pp;
@@ -59,7 +58,7 @@ static bool ls_pcie_is_bridge(struct ls_pcie *pcie)
 {
 	u32 header_type;
 
-	header_type = ioread8(pcie->dbi + PCI_HEADER_TYPE);
+	header_type = ioread8(pcie->pp.dbi_base + PCI_HEADER_TYPE);
 	header_type &= 0x7f;
 
 	return header_type == PCI_HEADER_TYPE_BRIDGE;
@@ -68,13 +67,13 @@ static bool ls_pcie_is_bridge(struct ls_pcie *pcie)
 /* Clear multi-function bit */
 static void ls_pcie_clear_multifunction(struct ls_pcie *pcie)
 {
-	iowrite8(PCI_HEADER_TYPE_BRIDGE, pcie->dbi + PCI_HEADER_TYPE);
+	iowrite8(PCI_HEADER_TYPE_BRIDGE, pcie->pp.dbi_base + PCI_HEADER_TYPE);
 }
 
 /* Fix class value */
 static void ls_pcie_fix_class(struct ls_pcie *pcie)
 {
-	iowrite16(PCI_CLASS_BRIDGE_PCI, pcie->dbi + PCI_CLASS_DEVICE);
+	iowrite16(PCI_CLASS_BRIDGE_PCI, pcie->pp.dbi_base + PCI_CLASS_DEVICE);
 }
 
 /* Drop MSG TLP except for Vendor MSG */
@@ -82,9 +81,9 @@ static void ls_pcie_drop_msg_tlp(struct ls_pcie *pcie)
 {
 	u32 val;
 
-	val = ioread32(pcie->dbi + PCIE_STRFMR1);
+	val = ioread32(pcie->pp.dbi_base + PCIE_STRFMR1);
 	val &= 0xDFFFFFFF;
-	iowrite32(val, pcie->dbi + PCIE_STRFMR1);
+	iowrite32(val, pcie->pp.dbi_base + PCIE_STRFMR1);
 }
 
 static int ls1021_pcie_link_up(struct pcie_port *pp)
@@ -149,11 +148,11 @@ static void ls_pcie_host_init(struct pcie_port *pp)
 {
 	struct ls_pcie *pcie = to_ls_pcie(pp);
 
-	iowrite32(1, pcie->dbi + PCIE_DBI_RO_WR_EN);
+	iowrite32(1, pcie->pp.dbi_base + PCIE_DBI_RO_WR_EN);
 	ls_pcie_fix_class(pcie);
 	ls_pcie_clear_multifunction(pcie);
 	ls_pcie_drop_msg_tlp(pcie);
-	iowrite32(0, pcie->dbi + PCIE_DBI_RO_WR_EN);
+	iowrite32(0, pcie->pp.dbi_base + PCIE_DBI_RO_WR_EN);
 }
 
 static int ls_pcie_msi_host_init(struct pcie_port *pp,
@@ -222,7 +221,6 @@ static int __init ls_add_pcie_port(struct pcie_port *pp,
 	struct ls_pcie *pcie = to_ls_pcie(pp);
 
 	pp->dev = dev;
-	pp->dbi_base = pcie->dbi;
 	pp->ops = pcie->drvdata->ops;
 
 	ret = dw_pcie_host_init(pp);
@@ -251,14 +249,14 @@ static int __init ls_pcie_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	dbi_base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
-	pcie->dbi = devm_ioremap_resource(dev, dbi_base);
-	if (IS_ERR(pcie->dbi)) {
+	pcie->pp.dbi_base = devm_ioremap_resource(dev, dbi_base);
+	if (IS_ERR(pcie->pp.dbi_base)) {
 		dev_err(dev, "missing *regs* space\n");
-		return PTR_ERR(pcie->dbi);
+		return PTR_ERR(pcie->pp.dbi_base);
 	}
 
 	pcie->drvdata = match->data;
-	pcie->lut = pcie->dbi + pcie->drvdata->lut_offset;
+	pcie->lut = pcie->pp.dbi_base + pcie->drvdata->lut_offset;
 
 	if (!ls_pcie_is_bridge(pcie))
 		return -ENODEV;


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 4/7] PCI: layerscape: Pass device-specific struct to internal functions
  2016-10-12 13:57 [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
                   ` (2 preceding siblings ...)
  2016-10-12 13:57 ` [PATCH v2 3/7] PCI: layerscape: Remove redundant struct ls_pcie.dbi Bjorn Helgaas
@ 2016-10-12 13:57 ` Bjorn Helgaas
  2016-10-12 13:58 ` [PATCH v2 5/7] PCI: layerscape: Move struct pcie_port setup to probe function Bjorn Helgaas
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2016-10-12 13:57 UTC (permalink / raw)
  To: Minghuan Lian, Mingkai Hu, Roy Zang; +Cc: linux-pci, linuxppc-dev

Only interfaces used from outside the driver, e.g., those called by the
DesignWare core, need to accept pointers to the generic struct pcie_port.
Internal interfaces can accept pointers to the device-specific struct,
which makes them more straightforward.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-layerscape.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c
index bdafe55..2b31296 100644
--- a/drivers/pci/host/pci-layerscape.c
+++ b/drivers/pci/host/pci-layerscape.c
@@ -213,12 +213,12 @@ static const struct of_device_id ls_pcie_of_match[] = {
 	{ },
 };
 
-static int __init ls_add_pcie_port(struct pcie_port *pp,
+static int __init ls_add_pcie_port(struct ls_pcie *pcie,
 				   struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
+	struct pcie_port *pp = &pcie->pp;
 	int ret;
-	struct ls_pcie *pcie = to_ls_pcie(pp);
 
 	pp->dev = dev;
 	pp->ops = pcie->drvdata->ops;
@@ -261,7 +261,7 @@ static int __init ls_pcie_probe(struct platform_device *pdev)
 	if (!ls_pcie_is_bridge(pcie))
 		return -ENODEV;
 
-	ret = ls_add_pcie_port(&pcie->pp, pdev);
+	ret = ls_add_pcie_port(pcie, pdev);
 	if (ret < 0)
 		return ret;
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 5/7] PCI: layerscape: Move struct pcie_port setup to probe function
  2016-10-12 13:57 [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
                   ` (3 preceding siblings ...)
  2016-10-12 13:57 ` [PATCH v2 4/7] PCI: layerscape: Pass device-specific struct to internal functions Bjorn Helgaas
@ 2016-10-12 13:58 ` Bjorn Helgaas
  2016-10-12 13:58 ` [PATCH v2 6/7] PCI: layerscape: Remove unused ls_add_pcie_port() platform_device arg Bjorn Helgaas
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2016-10-12 13:58 UTC (permalink / raw)
  To: Minghuan Lian, Mingkai Hu, Roy Zang; +Cc: linux-pci, linuxppc-dev

Do the basic pcie_port setup in the probe function for consistency with
other drivers.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-layerscape.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c
index 2b31296..2d77104 100644
--- a/drivers/pci/host/pci-layerscape.c
+++ b/drivers/pci/host/pci-layerscape.c
@@ -216,13 +216,10 @@ static const struct of_device_id ls_pcie_of_match[] = {
 static int __init ls_add_pcie_port(struct ls_pcie *pcie,
 				   struct platform_device *pdev)
 {
-	struct device *dev = &pdev->dev;
 	struct pcie_port *pp = &pcie->pp;
+	struct device *dev = pp->dev;
 	int ret;
 
-	pp->dev = dev;
-	pp->ops = pcie->drvdata->ops;
-
 	ret = dw_pcie_host_init(pp);
 	if (ret) {
 		dev_err(dev, "failed to initialize host\n");
@@ -237,6 +234,7 @@ static int __init ls_pcie_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	const struct of_device_id *match;
 	struct ls_pcie *pcie;
+	struct pcie_port *pp;
 	struct resource *dbi_base;
 	int ret;
 
@@ -248,6 +246,10 @@ static int __init ls_pcie_probe(struct platform_device *pdev)
 	if (!pcie)
 		return -ENOMEM;
 
+	pp = &pcie->pp;
+	pp->dev = dev;
+	pp->ops = pcie->drvdata->ops;
+
 	dbi_base = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
 	pcie->pp.dbi_base = devm_ioremap_resource(dev, dbi_base);
 	if (IS_ERR(pcie->pp.dbi_base)) {


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 6/7] PCI: layerscape: Remove unused ls_add_pcie_port() platform_device arg
  2016-10-12 13:57 [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
                   ` (4 preceding siblings ...)
  2016-10-12 13:58 ` [PATCH v2 5/7] PCI: layerscape: Move struct pcie_port setup to probe function Bjorn Helgaas
@ 2016-10-12 13:58 ` Bjorn Helgaas
  2016-10-12 13:58 ` [PATCH v2 7/7] PCI: layerscape: Reorder struct ls_pcie Bjorn Helgaas
  2016-10-12 16:06 ` [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
  7 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2016-10-12 13:58 UTC (permalink / raw)
  To: Minghuan Lian, Mingkai Hu, Roy Zang; +Cc: linux-pci, linuxppc-dev

ls_add_pcie_port() doesn't use the platform_device pointer passed to it, so
remove it.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-layerscape.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c
index 2d77104..3a86c1a 100644
--- a/drivers/pci/host/pci-layerscape.c
+++ b/drivers/pci/host/pci-layerscape.c
@@ -213,8 +213,7 @@ static const struct of_device_id ls_pcie_of_match[] = {
 	{ },
 };
 
-static int __init ls_add_pcie_port(struct ls_pcie *pcie,
-				   struct platform_device *pdev)
+static int __init ls_add_pcie_port(struct ls_pcie *pcie)
 {
 	struct pcie_port *pp = &pcie->pp;
 	struct device *dev = pp->dev;
@@ -263,7 +262,7 @@ static int __init ls_pcie_probe(struct platform_device *pdev)
 	if (!ls_pcie_is_bridge(pcie))
 		return -ENODEV;
 
-	ret = ls_add_pcie_port(pcie, pdev);
+	ret = ls_add_pcie_port(pcie);
 	if (ret < 0)
 		return ret;
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 7/7] PCI: layerscape: Reorder struct ls_pcie
  2016-10-12 13:57 [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
                   ` (5 preceding siblings ...)
  2016-10-12 13:58 ` [PATCH v2 6/7] PCI: layerscape: Remove unused ls_add_pcie_port() platform_device arg Bjorn Helgaas
@ 2016-10-12 13:58 ` Bjorn Helgaas
  2016-10-12 16:06 ` [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
  7 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2016-10-12 13:58 UTC (permalink / raw)
  To: Minghuan Lian, Mingkai Hu, Roy Zang; +Cc: linux-pci, linuxppc-dev

Reorder struct ls_pcie to put generic fields first.  No functional change
intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 drivers/pci/host/pci-layerscape.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c
index 3a86c1a..2cb7315 100644
--- a/drivers/pci/host/pci-layerscape.c
+++ b/drivers/pci/host/pci-layerscape.c
@@ -45,9 +45,9 @@ struct ls_pcie_drvdata {
 };
 
 struct ls_pcie {
+	struct pcie_port pp;		/* pp.dbi_base is DT regs */
 	void __iomem *lut;
 	struct regmap *scfg;
-	struct pcie_port pp;
 	const struct ls_pcie_drvdata *drvdata;
 	int index;
 };


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/7] PCI: layerscape: Cleanups
  2016-10-12 13:57 [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
                   ` (6 preceding siblings ...)
  2016-10-12 13:58 ` [PATCH v2 7/7] PCI: layerscape: Reorder struct ls_pcie Bjorn Helgaas
@ 2016-10-12 16:06 ` Bjorn Helgaas
  2016-10-12 16:32   ` Roy Zang
  7 siblings, 1 reply; 10+ messages in thread
From: Bjorn Helgaas @ 2016-10-12 16:06 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Minghuan Lian, Mingkai Hu, Roy Zang, linux-pci, linuxppc-dev

On Wed, Oct 12, 2016 at 08:57:22AM -0500, Bjorn Helgaas wrote:
>   - Add local "dev" pointers to reduce repetition of things like
>     "&pdev->dev".
> 
>   - Remove platform drvdata because it appears unused (we called
>     platform_set_drvdata() but not platform_get_drvdata()).
> 
>   - Remove redundant struct members.
> 
>   - Pass device-specific struct to internal functions for consistency.
> 
>   - Move struct pcie_port setup to probe function for consistency.
> 
>   - Remove unused ls_add_pcie_port() platform_device argument.
> 
> Nothing here should change the behavior of the driver.
> 
> Changes from v1:
>   I dropped the following patch because it was a lot of churn for
>   questionable benefit:
>     PCI: layerscape: Name private struct pointer "ls" consistently
> 
> ---
> 
> Bjorn Helgaas (7):
>       PCI: layerscape: Add local struct device pointers
>       PCI: layerscape: Remove unused platform data
>       PCI: layerscape: Remove redundant struct ls_pcie.dbi
>       PCI: layerscape: Pass device-specific struct to internal functions
>       PCI: layerscape: Move struct pcie_port setup to probe function
>       PCI: layerscape: Remove unused ls_add_pcie_port() platform_device arg
>       PCI: layerscape: Reorder struct ls_pcie
> 
> 
>  drivers/pci/host/pci-layerscape.c |   65 +++++++++++++++++++------------------
>  1 file changed, 33 insertions(+), 32 deletions(-)

I applied these to pci/host-layerscape for v4.9.  I hope to ask Linus to
pull them tomorrow, so if you see any issues, let me know soon.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/7] PCI: layerscape: Cleanups
  2016-10-12 16:06 ` [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
@ 2016-10-12 16:32   ` Roy Zang
  0 siblings, 0 replies; 10+ messages in thread
From: Roy Zang @ 2016-10-12 16:32 UTC (permalink / raw)
  To: Bjorn Helgaas, Bjorn Helgaas
  Cc: Minghuan Lian, Mingkai Hu, Roy Zang, linux-pci@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org

On 10/12/2016 11:07 AM, Bjorn Helgaas wrote:=0A=
> I applied these to pci/host-layerscape for v4.9.  I hope to ask Linus to=
=0A=
> pull them tomorrow, so if you see any issues, let me know soon.=0A=
>=0A=
good to me.=0A=
=0A=
Thanks.=0A=
=0A=
Roy=0A=
=0A=

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-10-12 16:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-12 13:57 [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
2016-10-12 13:57 ` [PATCH v2 1/7] PCI: layerscape: Add local struct device pointers Bjorn Helgaas
2016-10-12 13:57 ` [PATCH v2 2/7] PCI: layerscape: Remove unused platform data Bjorn Helgaas
2016-10-12 13:57 ` [PATCH v2 3/7] PCI: layerscape: Remove redundant struct ls_pcie.dbi Bjorn Helgaas
2016-10-12 13:57 ` [PATCH v2 4/7] PCI: layerscape: Pass device-specific struct to internal functions Bjorn Helgaas
2016-10-12 13:58 ` [PATCH v2 5/7] PCI: layerscape: Move struct pcie_port setup to probe function Bjorn Helgaas
2016-10-12 13:58 ` [PATCH v2 6/7] PCI: layerscape: Remove unused ls_add_pcie_port() platform_device arg Bjorn Helgaas
2016-10-12 13:58 ` [PATCH v2 7/7] PCI: layerscape: Reorder struct ls_pcie Bjorn Helgaas
2016-10-12 16:06 ` [PATCH v2 0/7] PCI: layerscape: Cleanups Bjorn Helgaas
2016-10-12 16:32   ` Roy Zang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox