Skip to contentSkip to conversation

linux-next: build warning after merge of the devicetree tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Oct 15, 2024 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the devicetree tree, today's linux-next build (powerpc allnoconfig) produced this warning:

drivers/of/address.c: In function 'of_pci_range_to_resource':
drivers/of/address.c:244:45: warning: passing argument 1 of 'pci_register_io_range' discards 'const' qualifier from pointer target type [-Wdiscarded-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: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,

      |                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~

Introduced by commit

1957da25d023 ("of: Constify struct device_node function arguments")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 13 lines · Stephen Rothwell

Hi all,

After merging the devicetree tree, today's linux-next build (powerpc allnoconfig) produced this warning:

drivers/of/address.c: In function 'of_pci_range_to_resource':
drivers/of/address.c:244:45: warning: passing argument 1 of 'pci_register_io_range' discards 'const' qualifier from pointer target type [-Wdiscarded-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: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,

Quoted 5 lines
      |                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~

Introduced by commit

1957da25d023 ("of: Constify struct device_node function arguments")

Missed the static inline. Now fixed up. Thanks.

Rob