diff options
author | 2025-02-24 15:13:54 +0100 | |
---|---|---|
committer | 2025-02-28 15:13:07 -0600 | |
commit | 3dc8adeeefa0256917d1e3978c8b4a06346816ed (patch) | |
tree | 791f9228b9926ec3cfa84464968385ba50058323 | |
parent | PCI: of_property: Add support for NULL pdev in of_pci_set_address() (diff) | |
download | wireguard-linux-3dc8adeeefa0256917d1e3978c8b4a06346816ed.tar.xz wireguard-linux-3dc8adeeefa0256917d1e3978c8b4a06346816ed.zip |
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>
-rw-r--r-- | drivers/pci/of_property.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/of_property.c b/drivers/pci/of_property.c index a6acd64ff869..afc229843d07 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; |