From: Herve Codina Date: Mon, 24 Feb 2025 14:13:54 +0000 (+0100) Subject: PCI: of_property: Constify parameter in of_pci_get_addr_flags() X-Git-Tag: v6.15-rc1~119^2~21^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dc8adeeefa0256917d1e3978c8b4a06346816ed;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring (Arm) --- diff --git a/drivers/pci/of_property.c b/drivers/pci/of_property.c index a6acd64ff8695..afc229843d078 100644 --- a/drivers/pci/of_property.c +++ b/drivers/pci/of_property.c @@ -69,7 +69,7 @@ static void of_pci_set_address(struct pci_dev *pdev, u32 *prop, u64 addr, } } -static int of_pci_get_addr_flags(struct resource *res, u32 *flags) +static int of_pci_get_addr_flags(const struct resource *res, u32 *flags) { u32 ss;