diff mbox series

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

Message ID 20240430071054.248008-4-cassel@kernel.org
State New
Headers show
Series [1/2] PCI: dra7xx: Fix cpu_addr_fixup parameter name | expand

Commit Message

Niklas Cassel April 30, 2024, 7:10 a.m. UTC
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.

Signed-off-by: Niklas Cassel <cassel@kernel.org>
---
 drivers/pci/controller/dwc/pcie-artpec6.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Jesper Nilsson April 30, 2024, 1:19 p.m. UTC | #1
On Tue, Apr 30, 2024 at 09:10:56AM +0200, Niklas Cassel wrote:
> 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.
> 
> Signed-off-by: Niklas Cassel <cassel@kernel.org>

Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>

/^JN - Jesper Nilsson
diff mbox series

Patch

diff --git a/drivers/pci/controller/dwc/pcie-artpec6.c b/drivers/pci/controller/dwc/pcie-artpec6.c
index a4630b92489b..65cbb267881d 100644
--- a/drivers/pci/controller/dwc/pcie-artpec6.c
+++ b/drivers/pci/controller/dwc/pcie-artpec6.c
@@ -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)