public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Hans Zhang <18255117159@163.com>
Cc: lpieralisi@kernel.org, kwilczynski@kernel.org,
	bhelgaas@google.com, jingoohan1@gmail.com, mani@kernel.org,
	vigneshr@ti.com, Rob Herring <robh@kernel.org>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] PCI: dwc: designware-plat: Use common mode field in struct dw_pcie
Date: Fri, 1 May 2026 11:48:29 -0500	[thread overview]
Message-ID: <20260501164219.GA490400@bhelgaas> (raw)
In-Reply-To: <20260501161010.71688-1-18255117159@163.com>

[cc: xrobh->robh@kernel.org]

On Sat, May 02, 2026 at 12:10:06AM +0800, Hans Zhang wrote:
> 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(-)

Thanks for doing this!

Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>

      parent reply	other threads:[~2026-05-01 16:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Bjorn Helgaas [this message]

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=20260501164219.GA490400@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=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=robh@kernel.org \
    --cc=vigneshr@ti.com \
    /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