[PATCH v2 1/4] PCI: of: drop the reg_num argument to of_pci_set_address()
From: Alex Elder
Date: Wed Aug 12 2026 - 13:23:07 EST
The reg_num argument passed to of_pci_set_address() is always zero,
so get rid of it.
Reviewed-by: Herve Codina <herve.codina@xxxxxxxxxxx>
Signed-off-by: Alex Elder <elder@xxxxxxxxxxxx>
---
drivers/pci/of_property.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/of_property.c b/drivers/pci/of_property.c
index 75a358f73e694..505226b876c56 100644
--- a/drivers/pci/of_property.c
+++ b/drivers/pci/of_property.c
@@ -52,7 +52,7 @@ enum of_pci_prop_compatible {
};
static void of_pci_set_address(struct pci_dev *pdev, u32 *prop, u64 addr,
- u32 reg_num, u32 flags, bool reloc)
+ u32 flags, bool reloc)
{
if (pdev) {
prop[0] = FIELD_PREP(OF_PCI_ADDR_FIELD_BUS, pdev->bus->number) |
@@ -61,7 +61,7 @@ static void of_pci_set_address(struct pci_dev *pdev, u32 *prop, u64 addr,
} else
prop[0] = 0;
- prop[0] |= flags | reg_num;
+ prop[0] |= flags;
if (!reloc) {
prop[0] |= OF_PCI_ADDR_FIELD_NONRELOC;
prop[1] = upper_32_bits(addr);
@@ -131,7 +131,7 @@ static int of_pci_prop_ranges(struct pci_dev *pdev, struct of_changeset *ocs,
continue;
val64 = pci_bus_address(pdev, &res[j] - pdev->resource);
- of_pci_set_address(pdev, rp[i].parent_addr, val64, 0, flags,
+ of_pci_set_address(pdev, rp[i].parent_addr, val64, flags,
false);
if (pci_is_bridge(pdev)) {
memcpy(rp[i].child_addr, rp[i].parent_addr,
@@ -164,7 +164,7 @@ static int of_pci_prop_reg(struct pci_dev *pdev, struct of_changeset *ocs,
struct of_pci_addr_pair reg = { 0 };
/* configuration space */
- of_pci_set_address(pdev, reg.phys_addr, 0, 0, 0, true);
+ of_pci_set_address(pdev, reg.phys_addr, 0, 0, true);
return of_changeset_add_prop_u32_array(ocs, np, "reg", (u32 *)®,
sizeof(reg) / sizeof(u32));
@@ -458,7 +458,7 @@ static int of_pci_host_bridge_prop_ranges(struct pci_host_bridge *bridge,
/* PCI bus address */
val64 = res->start;
of_pci_set_address(NULL, &ranges[ranges_sz],
- val64 - window->offset, 0, flags, false);
+ val64 - window->offset, flags, false);
ranges_sz += OF_PCI_ADDRESS_CELLS;
/* Host bus address */
--
2.53.0