Skip to contentSkip to conversation

PCI: dra7xx: Fix cpu_addr_fixup parameter name

PATCH Applied Niklas Cassel 3 participants 4 messages Apr 30, 2024 – May 17, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 PCI: dra7xx: Fix cpu_addr_fixup parameter name

The function pointer declaration for the cpu_addr_fixup() callback uses "cpu_addr" as parameter name.

Likewise, the argument that is supplied to the function pointer when the function is actually called is "cpu_addr".

Rename the cpu_addr_fixup parameter name to match reality.

---
 drivers/pci/controller/dwc/pci-dra7xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pci/controller/dwc/pci-dra7xx.c +2 -2
index d2d17d37d3e0..2b818346bb37 100644
@@ -113,9 +113,9 @@ static inline void dra7xx_pcie_writel(struct dra7xx_pcie *pcie, u32 offset,
 	writel(value, pcie->base + offset);
 }
 
-static u64 dra7xx_pcie_cpu_addr_fixup(struct dw_pcie *pci, u64 pci_addr)
+static u64 dra7xx_pcie_cpu_addr_fixup(struct dw_pcie *pci, u64 cpu_addr)
 {
-	return pci_addr & DRA7XX_CPU_TO_BUS_ADDR;
+	return cpu_addr & DRA7XX_CPU_TO_BUS_ADDR;
 }
 
 static int dra7xx_pcie_link_up(struct dw_pcie *pci)
Signature · 1 line
2.44.0
#1 lore raw

PATCH 2/2 PCI: artpec6: Fix cpu_addr_fixup parameter name

The function pointer declaration for the cpu_addr_fixup() callback uses "cpu_addr" as parameter name.

Likewise, the argument that is supplied to the function pointer when the function is actually called is "cpu_addr".

Rename the cpu_addr_fixup parameter name to match reality.

---
 drivers/pci/controller/dwc/pcie-artpec6.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/pci/controller/dwc/pcie-artpec6.c +4 -4
index a4630b92489b..65cbb267881d 100644
@@ -94,7 +94,7 @@ static void artpec6_pcie_writel(struct artpec6_pcie *artpec6_pcie, u32 offset, u
 	regmap_write(artpec6_pcie->regmap, offset, val);
 }
 
-static u64 artpec6_pcie_cpu_addr_fixup(struct dw_pcie *pci, u64 pci_addr)
+static u64 artpec6_pcie_cpu_addr_fixup(struct dw_pcie *pci, u64 cpu_addr)
 {
 	struct artpec6_pcie *artpec6_pcie = to_artpec6_pcie(pci);
 	struct dw_pcie_rp *pp = &pci->pp;
@@ -102,13 +102,13 @@ static u64 artpec6_pcie_cpu_addr_fixup(struct dw_pcie *pci, u64 pci_addr)
 
 	switch (artpec6_pcie->mode) {
 	case DW_PCIE_RC_TYPE:
-		return pci_addr - pp->cfg0_base;
+		return cpu_addr - pp->cfg0_base;
 	case DW_PCIE_EP_TYPE:
-		return pci_addr - ep->phys_base;
+		return cpu_addr - ep->phys_base;
 	default:
 		dev_err(pci->dev, "UNKNOWN device type\n");
 	}
-	return pci_addr;
+	return cpu_addr;
 }
 
 static int artpec6_pcie_establish_link(struct dw_pcie *pci)
Signature · 1 line
2.44.0
maintainer Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] PCI: artpec6: Fix cpu_addr_fixup parameter name

Quoted 9 lines · Niklas Cassel

The function pointer declaration for the cpu_addr_fixup() callback uses "cpu_addr" as parameter name.

Likewise, the argument that is supplied to the function pointer when the function is actually called is "cpu_addr".

Rename the cpu_addr_fixup parameter name to match reality.

/^JN - Jesper Nilsson

Signature · 1 line
               Jesper Nilsson -- [email protected]
#3 lore raw
In reply to Niklas Cassel

Hello,

Quoted 7 lines

The function pointer declaration for the cpu_addr_fixup() callback uses "cpu_addr" as parameter name.

Likewise, the argument that is supplied to the function pointer when the function is actually called is "cpu_addr".

Rename the cpu_addr_fixup parameter name to match reality.

Applied to controller/dwc, thank you!

[01/02] PCI: dra7xx: Fix dra7xx_pcie_cpu_addr_fixup() parameter name

        https://git.kernel.org/pci/pci/c/6f4c62fd8a32
[02/02] PCI: artpec6: Fix artpec6_pcie_cpu_addr_fixup() parameter name
        https://git.kernel.org/pci/pci/c/49993453e079

	Krzysztof