Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

PCI: Constify pci_register_io_range() fwnode_handle

pci_register_io_range() does not modify the passed in fwnode_handle, so
make it const.

Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20241010-dt-const-v1-1-87a51f558425@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

+3 -3
+1 -1
drivers/pci/pci.c
··· 4163 4163 * Record the PCI IO range (expressed as CPU physical address + size). 4164 4164 * Return a negative value if an error has occurred, zero otherwise 4165 4165 */ 4166 - int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr, 4166 + int pci_register_io_range(const struct fwnode_handle *fwnode, phys_addr_t addr, 4167 4167 resource_size_t size) 4168 4168 { 4169 4169 int ret = 0;
+2 -2
include/linux/pci.h
··· 1556 1556 void *alignf_data); 1557 1557 1558 1558 1559 - int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr, 1559 + int pci_register_io_range(const struct fwnode_handle *fwnode, phys_addr_t addr, 1560 1560 resource_size_t size); 1561 1561 unsigned long pci_address_to_pio(phys_addr_t addr); 1562 1562 phys_addr_t pci_pio_to_address(unsigned long pio); ··· 2019 2019 { return -EIO; } 2020 2020 static inline void pci_release_regions(struct pci_dev *dev) { } 2021 2021 2022 - static inline int pci_register_io_range(struct fwnode_handle *fwnode, 2022 + static inline int pci_register_io_range(const struct fwnode_handle *fwnode, 2023 2023 phys_addr_t addr, resource_size_t size) 2024 2024 { return -EINVAL; } 2025 2025