Skip to contentSkip to conversation

PCI: dwc: Remove unused of_gpio.h

PATCH Superseded Andy Shevchenko 2 participants 5 messages Mar 7, 2024 – Apr 23, 2024

Subsystems (8)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: dwc: Remove unused of_gpio.h

of_gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.

---
 drivers/pci/controller/dwc/pci-dra7xx.c    | 1 -
 drivers/pci/controller/dwc/pci-meson.c     | 1 -
 drivers/pci/controller/dwc/pcie-qcom.c     | 1 -
 drivers/pci/controller/dwc/pcie-tegra194.c | 2 --
 4 files changed, 5 deletions(-)
drivers/pci/controller/dwc/pci-dra7xx.c +0 -1
index 0e406677060d..f6d2ba42958b 100644
@@ -17,7 +17,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/phy/phy.h>
drivers/pci/controller/dwc/pci-meson.c +0 -1
index 6477c83262c2..db9482a113e9 100644
@@ -9,7 +9,6 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/gpio/consumer.h>
-#include <linux/of_gpio.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
drivers/pci/controller/dwc/pcie-qcom.c +0 -1
index 2ce2a3bd932b..0084a3390040 100644
@@ -20,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/pci.h>
 #include <linux/pm_runtime.h>
 #include <linux/platform_device.h>
drivers/pci/controller/dwc/pcie-tegra194.c +0 -2
index 1f7b662cb8e1..633d8dc50339 100644
@@ -13,7 +13,6 @@
 #include <linux/clk.h>
 #include <linux/debugfs.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
 #include <linux/gpio/consumer.h>
 #include <linux/interconnect.h>
 #include <linux/interrupt.h>
@@ -21,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/phy/phy.h>
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
#1 lore raw
Quoted 9 lines · Andy Shevchenko

of_gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.

---
 drivers/pci/controller/dwc/pci-dra7xx.c    | 1 -
 drivers/pci/controller/dwc/pci-meson.c     | 1 -
 drivers/pci/controller/dwc/pcie-qcom.c     | 1 -
 drivers/pci/controller/dwc/pcie-tegra194.c | 2 --

What about the rest?

drivers/pci/controller/dwc/pcie-kirin.c
drivers/pci/controller/dwc/pci-imx6.c

There is also one non-dwc driver:

drivers/pci/controller/pci-aardvark.c

It is better to remove it from all PCI drivers in a single patch.

- Mani

Quoted 61 lines
 4 files changed, 5 deletions(-)
drivers/pci/controller/dwc/pci-dra7xx.c +0 -1
index 0e406677060d..f6d2ba42958b 100644
@@ -17,7 +17,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/phy/phy.h>
drivers/pci/controller/dwc/pci-meson.c +0 -1
index 6477c83262c2..db9482a113e9 100644
@@ -9,7 +9,6 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/gpio/consumer.h>
-#include <linux/of_gpio.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
drivers/pci/controller/dwc/pcie-qcom.c +0 -1
index 2ce2a3bd932b..0084a3390040 100644
@@ -20,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/pci.h>
 #include <linux/pm_runtime.h>
 #include <linux/platform_device.h>
drivers/pci/controller/dwc/pcie-tegra194.c +0 -2
index 1f7b662cb8e1..633d8dc50339 100644
@@ -13,7 +13,6 @@
 #include <linux/clk.h>
 #include <linux/debugfs.h>
 #include <linux/delay.h>
-#include <linux/gpio.h>
 #include <linux/gpio/consumer.h>
 #include <linux/interconnect.h>
 #include <linux/interrupt.h>
@@ -21,7 +20,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_gpio.h>
 #include <linux/of_pci.h>
 #include <linux/pci.h>
 #include <linux/phy/phy.h>
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
Signature · 1 line
மணிவண்ணன் சதாசிவம்
#2 lore raw
Quoted 8 lines · Manivannan Sadhasivam
Quoted 2 lines · Andy Shevchenko

of_gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.

What about the rest?

drivers/pci/controller/dwc/pcie-kirin.c
drivers/pci/controller/dwc/pci-imx6.c

Have you chance to look at them?

Quoted 3 lines

There is also one non-dwc driver:

drivers/pci/controller/pci-aardvark.c

Keyword: non-dwc.
This patch is for DesignWare controllers that confirmed not using the header.

Quoted 1 line

It is better to remove it from all PCI drivers in a single patch.

I disagree on this. These are different drivers and even inside DesignWare not all of them can be converted with a simple change like this one.

That said, please consider applying this one as is.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 5 lines · Andy Shevchenko
Quoted 3 lines · Manivannan Sadhasivam
Quoted 2 lines · Andy Shevchenko

of_gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.

Quoted 7 lines
Quoted 4 lines

What about the rest?

drivers/pci/controller/dwc/pcie-kirin.c
drivers/pci/controller/dwc/pci-imx6.c

Have you chance to look at them?

Ok. I failed to spot the usage of of_get_named_gpio() in both drivers. But you already submitted a patch to convert kirin last year [1], and that didn't get any love from the maintainers. Could you please respin? Perhaps convert imx6 also?

[1] https://lore.kernel.org/all/[email protected]/

Quoted 4 lines
Quoted 3 lines

There is also one non-dwc driver:

drivers/pci/controller/pci-aardvark.c

Quoted 8 lines

Keyword: non-dwc.
This patch is for DesignWare controllers that confirmed not using the header.

Quoted 1 line

It is better to remove it from all PCI drivers in a single patch.

I disagree on this. These are different drivers and even inside DesignWare not all of them can be converted with a simple change like this one.

Since this is just a header removal I thought you can just send a single patch for these drivers since there is nothing special that warrants a separate patch for aardvark (both are inside the drivers/pci/ hierarchy).

But anyway, I wouldn't press for it.

Quoted 2 lines

That said, please consider applying this one as is.

I can give my R-o-b tag, but Lorenzo or Krzysztof will apply this.

- Mani

Signature · 1 line
மணிவண்ணன் சதாசிவம்
#4 lore raw
Quoted 8 lines · Manivannan Sadhasivam
Quoted 7 lines · Andy Shevchenko
Quoted 6 lines · Manivannan Sadhasivam
Quoted 2 lines · Andy Shevchenko

of_gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.

What about the rest?

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

drivers/pci/controller/dwc/pcie-kirin.c
drivers/pci/controller/dwc/pci-imx6.c

Have you chance to look at them?

Ok. I failed to spot the usage of of_get_named_gpio() in both drivers. But you already submitted a patch to convert kirin last year [1], and that didn't get any love from the maintainers. Could you please respin?

Sure.

Quoted 1 line

Perhaps convert imx6 also?

I'll look at it, if it's easy enough, why not, otherwise let it rotten for a while.

Quoted 11 lines

[1] https://lore.kernel.org/all/[email protected]/

Quoted 9 lines
Quoted 3 lines

There is also one non-dwc driver:

drivers/pci/controller/pci-aardvark.c

Keyword: non-dwc.
This patch is for DesignWare controllers that confirmed not using the header.

Quoted 1 line

It is better to remove it from all PCI drivers in a single patch.

Quoted 7 lines
Quoted 3 lines

I disagree on this. These are different drivers and even inside DesignWare not all of them can be converted with a simple change like this one.

Since this is just a header removal I thought you can just send a single patch for these drivers since there is nothing special that warrants a separate patch for aardvark (both are inside the drivers/pci/ hierarchy).

I'll look at aadvark as well, I dunno if it's simple removal enough there.

Quoted 7 lines

But anyway, I wouldn't press for it.

Quoted 1 line

That said, please consider applying this one as is.

I can give my R-o-b tag, but Lorenzo or Krzysztof will apply this.

Thank you!

Signature · 2 lines
With Best Regards,
Andy Shevchenko