linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device()
@ 2021-11-23 15:37 Fan Fei
  2021-11-23 15:37 ` [PATCH 1/7] PCI: altera: " Fan Fei
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Fan Fei @ 2021-11-23 15:37 UTC (permalink / raw)
  To: bjorn; +Cc: Fan Fei, linux-pci

Some drivers use of_match_device() in probe(), which returns a 
"struct of_device_id *". They need only the of_device_id.data member, so 
replace of_device_get_match_data() with of_match_device().

Fan Fei (7):
  PCI: altera: Prefer of_device_get_match_data() over of_match_device()
  PCI: cadence: Prefer of_device_get_match_data() over of_match_device()
  PCI: kirin: Prefer of_device_get_match_data() over of_match_device()
  PCI: dra7xx: Prefer of_device_get_match_data() over of_match_device()
  PCI: keystone: Prefer of_device_get_match_data() over
    of_match_device()
  PCI: artpec6: Prefer of_device_get_match_data() over of_match_device()
  PCI: dwc: Prefer of_device_get_match_data() over of_device_device()

 drivers/pci/controller/cadence/pcie-cadence-plat.c | 6 ++----
 drivers/pci/controller/dwc/pci-dra7xx.c            | 6 ++----
 drivers/pci/controller/dwc/pci-keystone.c          | 4 +---
 drivers/pci/controller/dwc/pcie-artpec6.c          | 6 ++----
 drivers/pci/controller/dwc/pcie-designware-plat.c  | 6 ++----
 drivers/pci/controller/dwc/pcie-kirin.c            | 6 ++----
 drivers/pci/controller/pcie-altera.c               | 8 ++++----
 7 files changed, 15 insertions(+), 27 deletions(-)

-- 
2.25.1


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

* [PATCH 1/7] PCI: altera: Prefer of_device_get_match_data() over of_match_device()
  2021-11-23 15:37 [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Fan Fei
@ 2021-11-23 15:37 ` Fan Fei
  2021-11-23 15:37 ` [PATCH 2/7] PCI: cadence: " Fan Fei
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Fan Fei @ 2021-11-23 15:37 UTC (permalink / raw)
  To: bjorn; +Cc: Fan Fei, linux-pci

The altera PCI controller driver only needs "struct altera_pcie_data *"
during probe(). Replace of_match_device(), which returns "struct
of_device_id *", with of_device_get_match_data(), to get "struct
altera_pcie_data *".

Signed-off-by: Fan Fei <ffclaire1224@gmail.com>
---
 drivers/pci/controller/pcie-altera.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/pcie-altera.c
index 2513e9363236..98ada2e20e02 100644
--- a/drivers/pci/controller/pcie-altera.c
+++ b/drivers/pci/controller/pcie-altera.c
@@ -767,7 +767,7 @@ static int altera_pcie_probe(struct platform_device *pdev)
 	struct altera_pcie *pcie;
 	struct pci_host_bridge *bridge;
 	int ret;
-	const struct of_device_id *match;
+	const struct altera_pcie_data *data;
 
 	bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie));
 	if (!bridge)
@@ -777,11 +777,11 @@ static int altera_pcie_probe(struct platform_device *pdev)
 	pcie->pdev = pdev;
 	platform_set_drvdata(pdev, pcie);
 
-	match = of_match_device(altera_pcie_of_match, &pdev->dev);
-	if (!match)
+	data = of_device_get_match_data(&pdev->dev);
+	if (!data)
 		return -ENODEV;
 
-	pcie->pcie_data = match->data;
+	pcie->pcie_data = data;
 
 	ret = altera_pcie_parse_dt(pcie);
 	if (ret) {
-- 
2.25.1


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

* [PATCH 2/7] PCI: cadence: Prefer of_device_get_match_data() over of_match_device()
  2021-11-23 15:37 [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Fan Fei
  2021-11-23 15:37 ` [PATCH 1/7] PCI: altera: " Fan Fei
@ 2021-11-23 15:37 ` Fan Fei
  2021-11-23 15:37 ` [PATCH 3/7] PCI: kirin: " Fan Fei
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Fan Fei @ 2021-11-23 15:37 UTC (permalink / raw)
  To: bjorn; +Cc: Fan Fei, linux-pci

The cadence PCI controller driver only needs
"struct cdns_plat_pcie_of_data *" during probe(). Replace
of_match_device(), which returns "struct of_device_id *", with
of_device_get_match_data(), to get "struct cdns_plat_pcie_of_data *"
directly.

Signed-off-by: Fan Fei <ffclaire1224@gmail.com>
---
 drivers/pci/controller/cadence/pcie-cadence-plat.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/cadence/pcie-cadence-plat.c b/drivers/pci/controller/cadence/pcie-cadence-plat.c
index a224afadbcc0..bac0541317c1 100644
--- a/drivers/pci/controller/cadence/pcie-cadence-plat.c
+++ b/drivers/pci/controller/cadence/pcie-cadence-plat.c
@@ -45,7 +45,6 @@ static int cdns_plat_pcie_probe(struct platform_device *pdev)
 {
 	const struct cdns_plat_pcie_of_data *data;
 	struct cdns_plat_pcie *cdns_plat_pcie;
-	const struct of_device_id *match;
 	struct device *dev = &pdev->dev;
 	struct pci_host_bridge *bridge;
 	struct cdns_pcie_ep *ep;
@@ -54,11 +53,10 @@ static int cdns_plat_pcie_probe(struct platform_device *pdev)
 	bool is_rc;
 	int ret;
 
-	match = of_match_device(cdns_plat_pcie_of_match, dev);
-	if (!match)
+	data = of_device_get_match_data(dev);
+	if (!data)
 		return -EINVAL;
 
-	data = (struct cdns_plat_pcie_of_data *)match->data;
 	is_rc = data->is_rc;
 
 	pr_debug(" Started %s with is_rc: %d\n", __func__, is_rc);
-- 
2.25.1


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

* [PATCH 3/7] PCI: kirin: Prefer of_device_get_match_data() over of_match_device()
  2021-11-23 15:37 [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Fan Fei
  2021-11-23 15:37 ` [PATCH 1/7] PCI: altera: " Fan Fei
  2021-11-23 15:37 ` [PATCH 2/7] PCI: cadence: " Fan Fei
@ 2021-11-23 15:37 ` Fan Fei
  2021-11-23 15:37 ` [PATCH 4/7] PCI: dra7xx: " Fan Fei
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Fan Fei @ 2021-11-23 15:37 UTC (permalink / raw)
  To: bjorn; +Cc: Fan Fei, linux-pci

The kirin PCI controller driver only needs "enum pcie_kirin_phy_type"
during probe(). Replace of_match_device(), which returns "struct
of_device_id *", with of_device_get_match_data(), and cast to long type,
referring "enum pcie_kirin_phy_type".

Signed-off-by: Fan Fei <ffclaire1224@gmail.com>
---
 drivers/pci/controller/dwc/pcie-kirin.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-kirin.c b/drivers/pci/controller/dwc/pcie-kirin.c
index 095afbccf9c1..8d6e241bd171 100644
--- a/drivers/pci/controller/dwc/pcie-kirin.c
+++ b/drivers/pci/controller/dwc/pcie-kirin.c
@@ -773,7 +773,6 @@ static const struct of_device_id kirin_pcie_match[] = {
 static int kirin_pcie_probe(struct platform_device *pdev)
 {
 	enum pcie_kirin_phy_type phy_type;
-	const struct of_device_id *of_id;
 	struct device *dev = &pdev->dev;
 	struct kirin_pcie *kirin_pcie;
 	struct dw_pcie *pci;
@@ -784,13 +783,12 @@ static int kirin_pcie_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	of_id = of_match_device(kirin_pcie_match, dev);
-	if (!of_id) {
+	phy_type = (long)of_device_get_match_data(dev);
+	if (!phy_type) {
 		dev_err(dev, "OF data missing\n");
 		return -EINVAL;
 	}
 
-	phy_type = (long)of_id->data;
 
 	kirin_pcie = devm_kzalloc(dev, sizeof(struct kirin_pcie), GFP_KERNEL);
 	if (!kirin_pcie)
-- 
2.25.1


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

* [PATCH 4/7] PCI: dra7xx: Prefer of_device_get_match_data() over of_match_device()
  2021-11-23 15:37 [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Fan Fei
                   ` (2 preceding siblings ...)
  2021-11-23 15:37 ` [PATCH 3/7] PCI: kirin: " Fan Fei
@ 2021-11-23 15:37 ` Fan Fei
  2021-11-23 15:38 ` [PATCH 5/7] PCI: keystone: " Fan Fei
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Fan Fei @ 2021-11-23 15:37 UTC (permalink / raw)
  To: bjorn; +Cc: Fan Fei, linux-pci

The dra7xx PCI controller driver only needs "struct dra7xx_pcie_of_data *"
during probe(). Replace of_match_device(), which returns
"struct of_device_id *", with of_device_get_match_data(), to get
"struct dra7xx_pcie_of_data *" directly.

Signed-off-by: Fan Fei <ffclaire1224@gmail.com>
---
 drivers/pci/controller/dwc/pci-dra7xx.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c
index a4221f6f3629..12d19183e746 100644
--- a/drivers/pci/controller/dwc/pci-dra7xx.c
+++ b/drivers/pci/controller/dwc/pci-dra7xx.c
@@ -697,16 +697,14 @@ static int dra7xx_pcie_probe(struct platform_device *pdev)
 	struct device_node *np = dev->of_node;
 	char name[10];
 	struct gpio_desc *reset;
-	const struct of_device_id *match;
 	const struct dra7xx_pcie_of_data *data;
 	enum dw_pcie_device_mode mode;
 	u32 b1co_mode_sel_mask;
 
-	match = of_match_device(of_match_ptr(of_dra7xx_pcie_match), dev);
-	if (!match)
+	data = of_device_get_match_data(dev);
+	if (!data)
 		return -EINVAL;
 
-	data = (struct dra7xx_pcie_of_data *)match->data;
 	mode = (enum dw_pcie_device_mode)data->mode;
 	b1co_mode_sel_mask = data->b1co_mode_sel_mask;
 
-- 
2.25.1


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

* [PATCH 5/7] PCI: keystone: Prefer of_device_get_match_data() over of_match_device()
  2021-11-23 15:37 [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Fan Fei
                   ` (3 preceding siblings ...)
  2021-11-23 15:37 ` [PATCH 4/7] PCI: dra7xx: " Fan Fei
@ 2021-11-23 15:38 ` Fan Fei
  2021-11-23 15:38 ` [PATCH 6/7] PCI: artpec6: " Fan Fei
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Fan Fei @ 2021-11-23 15:38 UTC (permalink / raw)
  To: bjorn; +Cc: Fan Fei, linux-pci

The keystone PCI controller driver only needs "struct ks_pcie_of_data *"
during probe(). Replace of_match_device(), which returns
"struct of_device_id *", with of_device_get_match_data(), to get
"struct ks_pcie_of_data *" directly.

Signed-off-by: Fan Fei <ffclaire1224@gmail.com>
---
 drivers/pci/controller/dwc/pci-keystone.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c
index 865258d8c53c..bf4755cb6c50 100644
--- a/drivers/pci/controller/dwc/pci-keystone.c
+++ b/drivers/pci/controller/dwc/pci-keystone.c
@@ -1087,7 +1087,6 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct device_node *np = dev->of_node;
 	const struct ks_pcie_of_data *data;
-	const struct of_device_id *match;
 	enum dw_pcie_device_mode mode;
 	struct dw_pcie *pci;
 	struct keystone_pcie *ks_pcie;
@@ -1104,8 +1103,7 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
 	int irq;
 	int i;
 
-	match = of_match_device(of_match_ptr(ks_pcie_of_match), dev);
-	data = (struct ks_pcie_of_data *)match->data;
+	data = of_device_get_match_data(dev);
 	if (!data)
 		return -EINVAL;
 
-- 
2.25.1


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

* [PATCH 6/7] PCI: artpec6: Prefer of_device_get_match_data() over of_match_device()
  2021-11-23 15:37 [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Fan Fei
                   ` (4 preceding siblings ...)
  2021-11-23 15:38 ` [PATCH 5/7] PCI: keystone: " Fan Fei
@ 2021-11-23 15:38 ` Fan Fei
  2021-11-23 15:38 ` [PATCH 7/7] PCI: dwc: Prefer of_device_get_match_data() over of_device_device() Fan Fei
  2021-12-08 20:50 ` [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Bjorn Helgaas
  7 siblings, 0 replies; 10+ messages in thread
From: Fan Fei @ 2021-11-23 15:38 UTC (permalink / raw)
  To: bjorn; +Cc: Fan Fei, linux-pci

The artpec6 PCI controller driver only needs "struct artpec_pcie_of_data *"
during probe(). Replace of_match_device(), which returns
"struct of_device_id *", with of_device_get_match_data(), to get
"struct artpec_pcie_of_data *" directly.

Signed-off-by: Fan Fei <ffclaire1224@gmail.com>
---
 drivers/pci/controller/dwc/pcie-artpec6.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-artpec6.c b/drivers/pci/controller/dwc/pcie-artpec6.c
index c91fc1954432..2f15441770e1 100644
--- a/drivers/pci/controller/dwc/pcie-artpec6.c
+++ b/drivers/pci/controller/dwc/pcie-artpec6.c
@@ -380,17 +380,15 @@ static int artpec6_pcie_probe(struct platform_device *pdev)
 	struct dw_pcie *pci;
 	struct artpec6_pcie *artpec6_pcie;
 	int ret;
-	const struct of_device_id *match;
 	const struct artpec_pcie_of_data *data;
 	enum artpec_pcie_variants variant;
 	enum dw_pcie_device_mode mode;
 	u32 val;
 
-	match = of_match_device(artpec6_pcie_of_match, dev);
-	if (!match)
+	data = of_device_get_match_data(dev);
+	if (!data)
 		return -EINVAL;
 
-	data = (struct artpec_pcie_of_data *)match->data;
 	variant = (enum artpec_pcie_variants)data->variant;
 	mode = (enum dw_pcie_device_mode)data->mode;
 
-- 
2.25.1


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

* [PATCH 7/7] PCI: dwc: Prefer of_device_get_match_data() over of_device_device()
  2021-11-23 15:37 [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Fan Fei
                   ` (5 preceding siblings ...)
  2021-11-23 15:38 ` [PATCH 6/7] PCI: artpec6: " Fan Fei
@ 2021-11-23 15:38 ` Fan Fei
  2021-12-08 20:50 ` [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Bjorn Helgaas
  7 siblings, 0 replies; 10+ messages in thread
From: Fan Fei @ 2021-11-23 15:38 UTC (permalink / raw)
  To: bjorn; +Cc: Fan Fei, linux-pci

The dw_plat PCI controller driver only needs
"struct dw_plat_pcie_of_data *" during probe(). Replace of_match_device(),
which returns "struct of_device_id *", with of_device_get_match_data(), to
get "struct dw_plat_pcie_of_data *" directly.

Signed-off-by: Fan Fei <ffclaire1224@gmail.com>
---
 drivers/pci/controller/dwc/pcie-designware-plat.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-designware-plat.c b/drivers/pci/controller/dwc/pcie-designware-plat.c
index 8851eb161a0e..0c5de87d3cc6 100644
--- a/drivers/pci/controller/dwc/pcie-designware-plat.c
+++ b/drivers/pci/controller/dwc/pcie-designware-plat.c
@@ -122,15 +122,13 @@ static int dw_plat_pcie_probe(struct platform_device *pdev)
 	struct dw_plat_pcie *dw_plat_pcie;
 	struct dw_pcie *pci;
 	int ret;
-	const struct of_device_id *match;
 	const struct dw_plat_pcie_of_data *data;
 	enum dw_pcie_device_mode mode;
 
-	match = of_match_device(dw_plat_pcie_of_match, dev);
-	if (!match)
+	data = of_device_get_match_data(dev);
+	if (!data)
 		return -EINVAL;
 
-	data = (struct dw_plat_pcie_of_data *)match->data;
 	mode = (enum dw_pcie_device_mode)data->mode;
 
 	dw_plat_pcie = devm_kzalloc(dev, sizeof(*dw_plat_pcie), GFP_KERNEL);
-- 
2.25.1


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

* Re: [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device()
  2021-11-23 15:37 [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Fan Fei
                   ` (6 preceding siblings ...)
  2021-11-23 15:38 ` [PATCH 7/7] PCI: dwc: Prefer of_device_get_match_data() over of_device_device() Fan Fei
@ 2021-12-08 20:50 ` Bjorn Helgaas
  2021-12-08 21:21   ` Bjorn Helgaas
  7 siblings, 1 reply; 10+ messages in thread
From: Bjorn Helgaas @ 2021-12-08 20:50 UTC (permalink / raw)
  To: Fan Fei; +Cc: bjorn, linux-pci, linux-kernel-mentees, Shuah Khan

On Tue, Nov 23, 2021 at 04:37:55PM +0100, Fan Fei wrote:
> Some drivers use of_match_device() in probe(), which returns a 
> "struct of_device_id *". They need only the of_device_id.data member, so 
> replace of_device_get_match_data() with of_match_device().
> 
> Fan Fei (7):
>   PCI: altera: Prefer of_device_get_match_data() over of_match_device()
>   PCI: cadence: Prefer of_device_get_match_data() over of_match_device()
>   PCI: kirin: Prefer of_device_get_match_data() over of_match_device()
>   PCI: dra7xx: Prefer of_device_get_match_data() over of_match_device()
>   PCI: keystone: Prefer of_device_get_match_data() over
>     of_match_device()
>   PCI: artpec6: Prefer of_device_get_match_data() over of_match_device()
>   PCI: dwc: Prefer of_device_get_match_data() over of_device_device()
> 
>  drivers/pci/controller/cadence/pcie-cadence-plat.c | 6 ++----
>  drivers/pci/controller/dwc/pci-dra7xx.c            | 6 ++----
>  drivers/pci/controller/dwc/pci-keystone.c          | 4 +---
>  drivers/pci/controller/dwc/pcie-artpec6.c          | 6 ++----
>  drivers/pci/controller/dwc/pcie-designware-plat.c  | 6 ++----
>  drivers/pci/controller/dwc/pcie-kirin.c            | 6 ++----
>  drivers/pci/controller/pcie-altera.c               | 8 ++++----
>  7 files changed, 15 insertions(+), 27 deletions(-)

Applied to pci/driver-cleanup for v5.17, thank you, Fan!

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

* Re: [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device()
  2021-12-08 20:50 ` [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Bjorn Helgaas
@ 2021-12-08 21:21   ` Bjorn Helgaas
  0 siblings, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2021-12-08 21:21 UTC (permalink / raw)
  To: Fan Fei; +Cc: bjorn, linux-pci, linux-kernel-mentees, Shuah Khan

On Wed, Dec 08, 2021 at 02:50:47PM -0600, Bjorn Helgaas wrote:
> On Tue, Nov 23, 2021 at 04:37:55PM +0100, Fan Fei wrote:
> > Some drivers use of_match_device() in probe(), which returns a 
> > "struct of_device_id *". They need only the of_device_id.data member, so 
> > replace of_device_get_match_data() with of_match_device().
> > 
> > Fan Fei (7):
> >   PCI: altera: Prefer of_device_get_match_data() over of_match_device()
> >   PCI: cadence: Prefer of_device_get_match_data() over of_match_device()
> >   PCI: kirin: Prefer of_device_get_match_data() over of_match_device()
> >   PCI: dra7xx: Prefer of_device_get_match_data() over of_match_device()
> >   PCI: keystone: Prefer of_device_get_match_data() over
> >     of_match_device()
> >   PCI: artpec6: Prefer of_device_get_match_data() over of_match_device()
> >   PCI: dwc: Prefer of_device_get_match_data() over of_device_device()
> > 
> >  drivers/pci/controller/cadence/pcie-cadence-plat.c | 6 ++----
> >  drivers/pci/controller/dwc/pci-dra7xx.c            | 6 ++----
> >  drivers/pci/controller/dwc/pci-keystone.c          | 4 +---
> >  drivers/pci/controller/dwc/pcie-artpec6.c          | 6 ++----
> >  drivers/pci/controller/dwc/pcie-designware-plat.c  | 6 ++----
> >  drivers/pci/controller/dwc/pcie-kirin.c            | 6 ++----
> >  drivers/pci/controller/pcie-altera.c               | 8 ++++----
> >  7 files changed, 15 insertions(+), 27 deletions(-)
> 
> Applied to pci/driver-cleanup for v5.17, thank you, Fan!

Also applied the following patch since it's closely related.


commit 667c60afad25 ("PCI: j721e: Drop pointless of_device_get_match_data() cast")
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Wed Dec 8 15:18:20 2021 -0600

    PCI: j721e: Drop pointless of_device_get_match_data() cast
    
    of_device_get_match_data() returns "void *", so no cast is needed when
    assigning the result to a pointer type.  Drop the unnecessary cast.
    
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c
index 918e11082e6a..0aa1c184bd42 100644
--- a/drivers/pci/controller/cadence/pci-j721e.c
+++ b/drivers/pci/controller/cadence/pci-j721e.c
@@ -367,7 +367,7 @@ static int j721e_pcie_probe(struct platform_device *pdev)
 	int ret;
 	int irq;
 
-	data = (struct j721e_pcie_data *)of_device_get_match_data(dev);
+	data = of_device_get_match_data(dev);
 	if (!data)
 		return -EINVAL;
 

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

end of thread, other threads:[~2021-12-08 21:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 15:37 [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Fan Fei
2021-11-23 15:37 ` [PATCH 1/7] PCI: altera: " Fan Fei
2021-11-23 15:37 ` [PATCH 2/7] PCI: cadence: " Fan Fei
2021-11-23 15:37 ` [PATCH 3/7] PCI: kirin: " Fan Fei
2021-11-23 15:37 ` [PATCH 4/7] PCI: dra7xx: " Fan Fei
2021-11-23 15:38 ` [PATCH 5/7] PCI: keystone: " Fan Fei
2021-11-23 15:38 ` [PATCH 6/7] PCI: artpec6: " Fan Fei
2021-11-23 15:38 ` [PATCH 7/7] PCI: dwc: Prefer of_device_get_match_data() over of_device_device() Fan Fei
2021-12-08 20:50 ` [PATCH 0/7] PCI: Prefer of_device_get_match_data() over of_match_device() Bjorn Helgaas
2021-12-08 21:21   ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).