public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: Constify pci_register_io_range stub fwnode_handle
@ 2024-10-16  6:24 Arnd Bergmann
  2024-10-16  8:12 ` Damien Le Moal
  2024-10-16 19:55 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2024-10-16  6:24 UTC (permalink / raw)
  To: Bjorn Helgaas, Krzysztof Kozlowski, Rob Herring (Arm)
  Cc: Arnd Bergmann, Dan Williams, Dave Jiang, Ilpo Järvinen,
	Manivannan Sadhasivam, Philipp Stanner, Johan Hovold,
	Reinette Chatre, Andy Shevchenko, Damien Le Moal, linux-pci,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The patch to change the argument types for pci_register_io_range()
only caught one of the two implementations, but missed the empty
version:

drivers/of/address.c: In function 'of_pci_range_to_resource':
drivers/of/address.c:244:45: error: passing argument 1 of 'pci_register_io_range' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  244 |                 err = pci_register_io_range(&np->fwnode, range->cpu_addr,
      |                                             ^~~~~~~~~~~
In file included from drivers/of/address.c:12:
include/linux/pci.h:1559:49: note: expected 'struct fwnode_handle *' but argument is of type 'const struct fwnode_handle *'
 1559 | int pci_register_io_range(struct fwnode_handle *fwnode, phys_addr_t addr,
      |                           ~~~~~~~~~~~~~~~~~~~~~~^~~~~~

Change this the same way.

Fixes: 6ad99a07e6d2 ("PCI: Constify pci_register_io_range() fwnode_handle")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
If possible, please fold this fixup into the original patch
---
 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 11421ae5c558..733ff6570e2d 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.39.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-16 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16  6:24 [PATCH] PCI: Constify pci_register_io_range stub fwnode_handle Arnd Bergmann
2024-10-16  8:12 ` Damien Le Moal
2024-10-16 19:55 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox