public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] PCI: dwc: designware-plat: Use common mode field in struct dw_pcie
@ 2026-05-01 16:10 Hans Zhang
  2026-05-01 16:10 ` [PATCH 1/4] PCI: dra7xx: " Hans Zhang
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Hans Zhang @ 2026-05-01 16:10 UTC (permalink / raw)
  To: lpieralisi, kwilczynski, bhelgaas, jingoohan1, mani, vigneshr
  Cc: xrobh, linux-pci, linux-kernel, Hans Zhang

Several DesignWare PCIe controller drivers (dra7xx, artpec6,
designware-plat, and keembay) duplicated the device mode field
in their private structures, while struct dw_pcie already contains
this field. This led to:
1. Data redundancy and potential inconsistencies
2. Increased maintenance complexity
3. Error-prone device type checks

This series fixes these issues by:
- Removing redundant mode fields from all four drivers
- Standardizing on dw_pcie->mode for device type detection
- Simplifying conditional logic in probe/suspend/resume paths
- Ensuring consistent error reporting

The changes improve code maintainability and eliminate class of bugs
related to mode synchronization.

Hans Zhang (4):
  PCI: dra7xx: Use common mode field in struct dw_pcie
  PCI: artpec6: Use common mode field in struct dw_pcie
  PCI: dwc: Use common mode field in struct dw_pcie
  PCI: keembay: Use common mode field in struct dw_pcie

 drivers/pci/controller/dwc/pci-dra7xx.c           | 11 +++++------
 drivers/pci/controller/dwc/pcie-artpec6.c         |  9 ++++-----
 drivers/pci/controller/dwc/pcie-designware-plat.c |  7 +++----
 drivers/pci/controller/dwc/pcie-keembay.c         |  9 ++++-----
 4 files changed, 16 insertions(+), 20 deletions(-)


base-commit: e75a43c7cec459a07d91ed17de4de13ede2b7758
-- 
2.34.1


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

end of thread, other threads:[~2026-05-01 16:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-01 16:10 [PATCH 0/4] PCI: dwc: designware-plat: Use common mode field in struct dw_pcie Hans Zhang
2026-05-01 16:10 ` [PATCH 1/4] PCI: dra7xx: " Hans Zhang
2026-05-01 16:10 ` [PATCH 2/4] PCI: artpec6: " Hans Zhang
2026-05-01 16:10 ` [PATCH 3/4] PCI: dwc: " Hans Zhang
2026-05-01 16:10 ` [PATCH 4/4] PCI: keembay: " Hans Zhang
2026-05-01 16:48 ` [PATCH 0/4] PCI: dwc: designware-plat: " Bjorn Helgaas

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