From: Hans Zhang <18255117159@163.com>
To: lpieralisi@kernel.org, kwilczynski@kernel.org,
bhelgaas@google.com, jingoohan1@gmail.com, mani@kernel.org,
vigneshr@ti.com
Cc: xrobh@kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, Hans Zhang <18255117159@163.com>
Subject: [PATCH 0/4] PCI: dwc: designware-plat: Use common mode field in struct dw_pcie
Date: Sat, 2 May 2026 00:10:06 +0800 [thread overview]
Message-ID: <20260501161010.71688-1-18255117159@163.com> (raw)
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
next reply other threads:[~2026-05-01 16:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-01 16:10 Hans Zhang [this message]
2026-05-01 16:10 ` [PATCH 1/4] PCI: dra7xx: Use common mode field in struct dw_pcie 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
2026-05-15 17:13 ` Manivannan Sadhasivam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260501161010.71688-1-18255117159@163.com \
--to=18255117159@163.com \
--cc=bhelgaas@google.com \
--cc=jingoohan1@gmail.com \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=vigneshr@ti.com \
--cc=xrobh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).