* [PATCH v1 0/4] PCI: dwc: Drop or replace unused linux/gpio.h
@ 2026-05-06 8:47 Andy Shevchenko
2026-05-06 8:47 ` [PATCH v1 1/4] PCI: amd-mdb: Use the right GPIO header Andy Shevchenko
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-05-06 8:47 UTC (permalink / raw)
To: Sai Krishna Musham, Niklas Cassel, Koichiro Den, Andy Shevchenko,
Manivannan Sadhasivam, Hans Zhang, linux-pci, linux-kernel,
linux-arm-kernel
Cc: Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
Bjorn Helgaas, Jingoo Han, Paul Walmsley, Greentime Hu,
Samuel Holland, Nobuhiro Iwamatsu
The <linux/gpio.h> is a legacy header that is going to die.
Make sure that PCI DesignWare drivers do not include it.
Compile tested on x86_64.
Andy Shevchenko (4):
PCI: amd-mdb: Use the right GPIO header
PCI: designware-plat: Drop unused include
PCI: fu740: Drop unused include
PCI: visconti: Drop unused include
drivers/pci/controller/dwc/pcie-amd-mdb.c | 2 +-
drivers/pci/controller/dwc/pcie-designware-plat.c | 1 -
drivers/pci/controller/dwc/pcie-fu740.c | 1 -
drivers/pci/controller/dwc/pcie-visconti.c | 1 -
4 files changed, 1 insertion(+), 4 deletions(-)
--
2.50.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v1 1/4] PCI: amd-mdb: Use the right GPIO header
2026-05-06 8:47 [PATCH v1 0/4] PCI: dwc: Drop or replace unused linux/gpio.h Andy Shevchenko
@ 2026-05-06 8:47 ` Andy Shevchenko
2026-05-06 8:47 ` [PATCH v1 2/4] PCI: designware-plat: Drop unused include Andy Shevchenko
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-05-06 8:47 UTC (permalink / raw)
To: Sai Krishna Musham, Niklas Cassel, Koichiro Den, Andy Shevchenko,
Manivannan Sadhasivam, Hans Zhang, linux-pci, linux-kernel,
linux-arm-kernel
Cc: Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
Bjorn Helgaas, Jingoo Han, Paul Walmsley, Greentime Hu,
Samuel Holland, Nobuhiro Iwamatsu
The driver includes the legacy GPIO header <linux/gpio.h> but does not
use any symbols from it and actually wants <linux/gpio/consumer.h>,
so fix this up.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pci/controller/dwc/pcie-amd-mdb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-amd-mdb.c b/drivers/pci/controller/dwc/pcie-amd-mdb.c
index 7e50e11fbffd..88208e967201 100644
--- a/drivers/pci/controller/dwc/pcie-amd-mdb.c
+++ b/drivers/pci/controller/dwc/pcie-amd-mdb.c
@@ -7,7 +7,7 @@
#include <linux/clk.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/irqdomain.h>
#include <linux/kernel.h>
--
2.50.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 2/4] PCI: designware-plat: Drop unused include
2026-05-06 8:47 [PATCH v1 0/4] PCI: dwc: Drop or replace unused linux/gpio.h Andy Shevchenko
2026-05-06 8:47 ` [PATCH v1 1/4] PCI: amd-mdb: Use the right GPIO header Andy Shevchenko
@ 2026-05-06 8:47 ` Andy Shevchenko
2026-05-06 10:16 ` sashiko-bot
2026-05-06 8:47 ` [PATCH v1 3/4] PCI: fu740: " Andy Shevchenko
` (2 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2026-05-06 8:47 UTC (permalink / raw)
To: Sai Krishna Musham, Niklas Cassel, Koichiro Den, Andy Shevchenko,
Manivannan Sadhasivam, Hans Zhang, linux-pci, linux-kernel,
linux-arm-kernel
Cc: Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
Bjorn Helgaas, Jingoo Han, Paul Walmsley, Greentime Hu,
Samuel Holland, Nobuhiro Iwamatsu
This file does not use the symbols from the legacy
<linux/gpio.h> header, so let's drop it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pci/controller/dwc/pcie-designware-plat.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-designware-plat.c b/drivers/pci/controller/dwc/pcie-designware-plat.c
index d103ab759c4e..7d896752d43c 100644
--- a/drivers/pci/controller/dwc/pcie-designware-plat.c
+++ b/drivers/pci/controller/dwc/pcie-designware-plat.c
@@ -8,7 +8,6 @@
*/
#include <linux/clk.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/init.h>
--
2.50.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 3/4] PCI: fu740: Drop unused include
2026-05-06 8:47 [PATCH v1 0/4] PCI: dwc: Drop or replace unused linux/gpio.h Andy Shevchenko
2026-05-06 8:47 ` [PATCH v1 1/4] PCI: amd-mdb: Use the right GPIO header Andy Shevchenko
2026-05-06 8:47 ` [PATCH v1 2/4] PCI: designware-plat: Drop unused include Andy Shevchenko
@ 2026-05-06 8:47 ` Andy Shevchenko
2026-05-06 8:47 ` [PATCH v1 4/4] PCI: visconti: " Andy Shevchenko
2026-05-06 17:23 ` [PATCH v1 0/4] PCI: dwc: Drop or replace unused linux/gpio.h Manivannan Sadhasivam
4 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-05-06 8:47 UTC (permalink / raw)
To: Sai Krishna Musham, Niklas Cassel, Koichiro Den, Andy Shevchenko,
Manivannan Sadhasivam, Hans Zhang, linux-pci, linux-kernel,
linux-arm-kernel
Cc: Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
Bjorn Helgaas, Jingoo Han, Paul Walmsley, Greentime Hu,
Samuel Holland, Nobuhiro Iwamatsu
This file does not use the symbols from the legacy
<linux/gpio.h> header, so let's drop it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pci/controller/dwc/pcie-fu740.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-fu740.c b/drivers/pci/controller/dwc/pcie-fu740.c
index 66367252032b..d0a34f680397 100644
--- a/drivers/pci/controller/dwc/pcie-fu740.c
+++ b/drivers/pci/controller/dwc/pcie-fu740.c
@@ -13,7 +13,6 @@
#include <linux/clk.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
#include <linux/gpio/consumer.h>
#include <linux/kernel.h>
#include <linux/module.h>
--
2.50.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 4/4] PCI: visconti: Drop unused include
2026-05-06 8:47 [PATCH v1 0/4] PCI: dwc: Drop or replace unused linux/gpio.h Andy Shevchenko
` (2 preceding siblings ...)
2026-05-06 8:47 ` [PATCH v1 3/4] PCI: fu740: " Andy Shevchenko
@ 2026-05-06 8:47 ` Andy Shevchenko
2026-05-06 17:23 ` [PATCH v1 0/4] PCI: dwc: Drop or replace unused linux/gpio.h Manivannan Sadhasivam
4 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-05-06 8:47 UTC (permalink / raw)
To: Sai Krishna Musham, Niklas Cassel, Koichiro Den, Andy Shevchenko,
Manivannan Sadhasivam, Hans Zhang, linux-pci, linux-kernel,
linux-arm-kernel
Cc: Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
Bjorn Helgaas, Jingoo Han, Paul Walmsley, Greentime Hu,
Samuel Holland, Nobuhiro Iwamatsu
This file does not use the symbols from the legacy
<linux/gpio.h> header, so let's drop it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pci/controller/dwc/pcie-visconti.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-visconti.c b/drivers/pci/controller/dwc/pcie-visconti.c
index cdeac6177143..f21775c3b3a1 100644
--- a/drivers/pci/controller/dwc/pcie-visconti.c
+++ b/drivers/pci/controller/dwc/pcie-visconti.c
@@ -10,7 +10,6 @@
#include <linux/clk.h>
#include <linux/delay.h>
-#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/iopoll.h>
--
2.50.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1 2/4] PCI: designware-plat: Drop unused include
2026-05-06 8:47 ` [PATCH v1 2/4] PCI: designware-plat: Drop unused include Andy Shevchenko
@ 2026-05-06 10:16 ` sashiko-bot
2026-05-06 10:22 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: sashiko-bot @ 2026-05-06 10:16 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-pci
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] In `dw_plat_pcie_probe()`, `pci_epc_init_notify()` is incorrectly called on the error path if `dw_pcie_ep_init_registers()` fails, falsely notifying EPF drivers that the EPC is ready.
--
commit e1010c1890e8eeb7c02639fb9293500993fe3d21
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
PCI: designware-plat: Drop unused include
This commit removes the unused <linux/gpio.h> header from the
pcie-designware-plat.c file since its symbols are not used.
> diff --git a/drivers/pci/controller/dwc/pcie-designware-plat.c b/drivers/pci/controller/dwc/pcie-designware-plat.c
> index d103ab759c4ee..7d896752d43cd 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-plat.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-plat.c
[ ... ]
While reviewing this file, I noticed a pre-existing regression in the
error handling path of dw_plat_pcie_probe():
drivers/pci/controller/dwc/pcie-designware-plat.c:dw_plat_pcie_probe() {
...
ret = dw_pcie_ep_init_registers(&pci->ep);
if (ret) {
dev_err(dev, "Failed to initialize DWC endpoint registers\n");
dw_pcie_ep_deinit(&pci->ep);
}
pci_epc_init_notify(pci->ep.epc);
...
}
If dw_pcie_ep_init_registers() fails, execution falls through and
unconditionally calls pci_epc_init_notify(pci->ep.epc) rather than returning
an error.
Will this falsely notify all registered endpoint functions that the
endpoint controller was successfully initialized?
Endpoint function drivers react to the epc_init event by attempting
to allocate memory, set BARs, and configure hardware registers. Because
the memory windows are destroyed by dw_pcie_ep_deinit() when it sets
num_windows to 0, could these operations lead to failed memory allocations
or synchronous external aborts when writing to inaccessible registers?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260506084858.867884-1-andriy.shevchenko@linux.intel.com?part=2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 2/4] PCI: designware-plat: Drop unused include
2026-05-06 10:16 ` sashiko-bot
@ 2026-05-06 10:22 ` Andy Shevchenko
0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-05-06 10:22 UTC (permalink / raw)
To: sashiko; +Cc: linux-pci
On Wed, May 06, 2026 at 10:16:51AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] In `dw_plat_pcie_probe()`, `pci_epc_init_notify()` is incorrectly called on the error path if `dw_pcie_ep_init_registers()` fails, falsely notifying EPF drivers that the EPC is ready.
> --
Nice, but completely unrelated to the scope of this mini-series.
Whoever knows better the code and wants to address that, please do.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 0/4] PCI: dwc: Drop or replace unused linux/gpio.h
2026-05-06 8:47 [PATCH v1 0/4] PCI: dwc: Drop or replace unused linux/gpio.h Andy Shevchenko
` (3 preceding siblings ...)
2026-05-06 8:47 ` [PATCH v1 4/4] PCI: visconti: " Andy Shevchenko
@ 2026-05-06 17:23 ` Manivannan Sadhasivam
4 siblings, 0 replies; 8+ messages in thread
From: Manivannan Sadhasivam @ 2026-05-06 17:23 UTC (permalink / raw)
To: Sai Krishna Musham, Niklas Cassel, Koichiro Den, Hans Zhang,
linux-pci, linux-kernel, linux-arm-kernel, Andy Shevchenko
Cc: Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
Bjorn Helgaas, Jingoo Han, Paul Walmsley, Greentime Hu,
Samuel Holland, Nobuhiro Iwamatsu
On Wed, 06 May 2026 10:47:23 +0200, Andy Shevchenko wrote:
> The <linux/gpio.h> is a legacy header that is going to die.
> Make sure that PCI DesignWare drivers do not include it.
>
> Compile tested on x86_64.
>
> Andy Shevchenko (4):
> PCI: amd-mdb: Use the right GPIO header
> PCI: designware-plat: Drop unused include
> PCI: fu740: Drop unused include
> PCI: visconti: Drop unused include
>
> [...]
Applied, thanks!
[1/4] PCI: amd-mdb: Use the right GPIO header
commit: 8d846a0a6f95cd717df892b077a1c990a86b29fa
[2/4] PCI: designware-plat: Drop unused include
commit: 800c861cfcbedd033bdffa65c00188fefdcf0767
[3/4] PCI: fu740: Drop unused include
commit: 71d007f6fb17f519c2fe51d35e0bee5f602169e6
[4/4] PCI: visconti: Drop unused include
commit: 7cc21269ef74269e423d64defc940808ccbf9774
Best regards,
--
Manivannan Sadhasivam <mani@kernel.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-05-06 17:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 8:47 [PATCH v1 0/4] PCI: dwc: Drop or replace unused linux/gpio.h Andy Shevchenko
2026-05-06 8:47 ` [PATCH v1 1/4] PCI: amd-mdb: Use the right GPIO header Andy Shevchenko
2026-05-06 8:47 ` [PATCH v1 2/4] PCI: designware-plat: Drop unused include Andy Shevchenko
2026-05-06 10:16 ` sashiko-bot
2026-05-06 10:22 ` Andy Shevchenko
2026-05-06 8:47 ` [PATCH v1 3/4] PCI: fu740: " Andy Shevchenko
2026-05-06 8:47 ` [PATCH v1 4/4] PCI: visconti: " Andy Shevchenko
2026-05-06 17:23 ` [PATCH v1 0/4] PCI: dwc: Drop or replace unused linux/gpio.h Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox