[PATCH v2 0/3] PCIe: Refactor link speed configuration with unified macro

Hans Zhang posted 3 patches 6 months, 2 weeks ago
There is a newer version of this series
drivers/pci/controller/dwc/pcie-designware.c | 18 +++---------------
drivers/pci/pci.h                            |  9 +++++++++
drivers/pci/pcie/bwctrl.c                    | 19 +------------------
3 files changed, 13 insertions(+), 33 deletions(-)
[PATCH v2 0/3] PCIe: Refactor link speed configuration with unified macro
Posted by Hans Zhang 6 months, 2 weeks ago
This series standardizes PCIe link speed handling across multiple drivers
by introducing a common conversion macro PCIE_SPEED2LNKCTL2_TLS(). The
changes eliminate redundant speed-to-register mappings and simplify code
maintenance:

The refactoring improves code consistency and reduces conditional
branching, while maintaining full backward compatibility with existing
speed settings.

---
Changes for v2:
- s/PCIE_SPEED2LNKCTL2_TLS_ENC/PCIE_SPEED2LNKCTL2_TLS
- The patch commit message were modified.
---

Hans Zhang (3):
  PCI: Add PCIE_SPEED2LNKCTL2_TLS conversion macro
  PCI: dwc: Simplify link speed configuration with macro
  PCI/bwctrl: Replace legacy speed conversion with shared macro

 drivers/pci/controller/dwc/pcie-designware.c | 18 +++---------------
 drivers/pci/pci.h                            |  9 +++++++++
 drivers/pci/pcie/bwctrl.c                    | 19 +------------------
 3 files changed, 13 insertions(+), 33 deletions(-)


base-commit: ec7714e4947909190ffb3041a03311a975350fe0
-- 
2.25.1
Re: [PATCH v2 0/3] PCIe: Refactor link speed configuration with unified macro
Posted by Hans Zhang 5 months, 3 weeks ago
Dear Ilpo,

Gentle ping.

Best regards,
Hans

On 2025/6/7 23:55, Hans Zhang wrote:
> This series standardizes PCIe link speed handling across multiple drivers
> by introducing a common conversion macro PCIE_SPEED2LNKCTL2_TLS(). The
> changes eliminate redundant speed-to-register mappings and simplify code
> maintenance:
> 
> The refactoring improves code consistency and reduces conditional
> branching, while maintaining full backward compatibility with existing
> speed settings.
> 
> ---
> Changes for v2:
> - s/PCIE_SPEED2LNKCTL2_TLS_ENC/PCIE_SPEED2LNKCTL2_TLS
> - The patch commit message were modified.
> ---
> 
> Hans Zhang (3):
>    PCI: Add PCIE_SPEED2LNKCTL2_TLS conversion macro
>    PCI: dwc: Simplify link speed configuration with macro
>    PCI/bwctrl: Replace legacy speed conversion with shared macro
> 
>   drivers/pci/controller/dwc/pcie-designware.c | 18 +++---------------
>   drivers/pci/pci.h                            |  9 +++++++++
>   drivers/pci/pcie/bwctrl.c                    | 19 +------------------
>   3 files changed, 13 insertions(+), 33 deletions(-)
> 
> 
> base-commit: ec7714e4947909190ffb3041a03311a975350fe0
Re: [PATCH v2 0/3] PCIe: Refactor link speed configuration with unified macro
Posted by Manivannan Sadhasivam 6 months ago
On Sat, Jun 07, 2025 at 11:55:42PM +0800, Hans Zhang wrote:
> This series standardizes PCIe link speed handling across multiple drivers
> by introducing a common conversion macro PCIE_SPEED2LNKCTL2_TLS(). The
> changes eliminate redundant speed-to-register mappings and simplify code
> maintenance:
> 
> The refactoring improves code consistency and reduces conditional
> branching, while maintaining full backward compatibility with existing
> speed settings.
> 

Acked-by: Manivannan Sadhasivam <mani@kernel.org>

- Mani

> ---
> Changes for v2:
> - s/PCIE_SPEED2LNKCTL2_TLS_ENC/PCIE_SPEED2LNKCTL2_TLS
> - The patch commit message were modified.
> ---
> 
> Hans Zhang (3):
>   PCI: Add PCIE_SPEED2LNKCTL2_TLS conversion macro
>   PCI: dwc: Simplify link speed configuration with macro
>   PCI/bwctrl: Replace legacy speed conversion with shared macro
> 
>  drivers/pci/controller/dwc/pcie-designware.c | 18 +++---------------
>  drivers/pci/pci.h                            |  9 +++++++++
>  drivers/pci/pcie/bwctrl.c                    | 19 +------------------
>  3 files changed, 13 insertions(+), 33 deletions(-)
> 
> 
> base-commit: ec7714e4947909190ffb3041a03311a975350fe0
> -- 
> 2.25.1
> 

-- 
மணிவண்ணன் சதாசிவம்