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/[email protected] Signed-off-by: Herve Codina <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]>
1 parent c5785a1 commit 3dc8ade

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)