Re: [PATCH 1/7] PCI: Constify pci_register_io_range() fwnode_handle

From: Krzysztof Kozlowski
Date: Fri Oct 11 2024 - 10:58:50 EST


On Thu, Oct 10, 2024 at 11:27:14AM -0500, Rob Herring (Arm) wrote:
> pci_register_io_range() does not modify the passed in fwnode_handle, so
> make it const.
>
> Signed-off-by: Rob Herring (Arm) <robh@xxxxxxxxxx>
> ---
> Please ack and I'll take with the rest of the series.
> ---
> drivers/pci/pci.c | 2 +-
> include/linux/pci.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 7d85c04fbba2..4b102bd1cfea 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -4163,7 +4163,7 @@ EXPORT_SYMBOL(pci_request_regions_exclusive);
> * Record the PCI IO range (expressed as CPU physical address + size).
> * Return a negative value if an error has occurred, zero otherwise
> */
> -int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr,
> +int pci_register_io_range(const struct fwnode_handle *fwnode, phys_addr_t addr,
> resource_size_t size)

Either I look at wrong tree (next) or something is missing and this is
not bisectable. The fwnode is assigned to range->fwnode which is not
const.

Best regards,
Krzysztof