[<prev] [next>] [day] [month] [year] [list]
Message-Id: <6a3ae390e2a978ec452ecbce3082cf51f7ee3076.1728989210.git.geert+renesas@glider.be>
Date: Tue, 15 Oct 2024 12:49:37 +0200
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Rob Herring <robh@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH] PCI: Constify dummy pci_register_io_range() fwnode_handle
If CONFIG_PCI=n:
drivers/of/address.c: In function ‘of_pci_range_to_resource’:
drivers/of/address.c:247:45: error: passing argument 1 of ‘pci_register_io_range’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
247 | err = pci_register_io_range(&np->fwnode, range->cpu_addr,
| ^~~~~~~~~~~
In file included from drivers/of/address.c:12:
include/linux/pci.h:2022:63: note: expected ‘struct fwnode_handle *’ but argument is of type ‘const struct fwnode_handle *’
2022 | static inline int pci_register_io_range(struct fwnode_handle *fwnode,
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Fixes: 6ad99a07e6d2ed91 ("PCI: Constify pci_register_io_range() fwnode_handle")
Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
---
include/linux/pci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 11421ae5c5586443..733ff6570e2d5544 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -2019,7 +2019,7 @@ static inline int pci_request_regions(struct pci_dev *dev, const char *res_name)
{ return -EIO; }
static inline void pci_release_regions(struct pci_dev *dev) { }
-static inline int pci_register_io_range(struct fwnode_handle *fwnode,
+static inline int pci_register_io_range(const struct fwnode_handle *fwnode,
phys_addr_t addr, resource_size_t size)
{ return -EINVAL; }
--
2.34.1
Powered by blists - more mailing lists