Skip to content

Commit 3dc8ade

Browse files
hcodinabjorn-helgaas
authored andcommitted
PCI: of_property: Constify parameter in of_pci_get_addr_flags()
The res parameter has no reason to be a pointer to an un-const struct resource. Indeed, struct resource is not supposed to be modified by the function. Constify the res parameter. Link: https://lore.kernel.org/r/20250224141356.36325-5-herve.codina@bootlin.com Signed-off-by: Herve Codina <herve.codina@bootlin.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
1 parent c5785a1 commit 3dc8ade

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pci/of_property.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static void of_pci_set_address(struct pci_dev *pdev, u32 *prop, u64 addr,
6969
}
7070
}
7171

72-
static int of_pci_get_addr_flags(struct resource *res, u32 *flags)
72+
static int of_pci_get_addr_flags(const struct resource *res, u32 *flags)
7373
{
7474
u32 ss;
7575

0 commit comments

Comments
 (0)