devm_ioremap_resource() does not currently take 'const' arguments, which results in a warning from the first driver trying to do it anyway: drivers/gpio/gpio-amd-fch.c: In function 'amd_fch_gpio_probe': drivers/gpio/gpio-amd-fch.c:171:49: error: passing argument 2 of 'devm_ioremap_resource' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores); ^~~~~~~~~~~~~~~~~~~ Change the prototype to allow it, as there is no real reason not to.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -704,7 +704,8 @@ extern unsigned long devm_get_free_pages(struct device *dev, · 703 unmodified lines | ||
| 704 | 704 | gfp_t gfp_mask, unsigned int order); |
| 705 | 705 | extern void devm_free_pages(struct device *dev, unsigned long addr); |
| 706 | 706 | |
| 707 | −void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res); | |
| 707 | +void __iomem *devm_ioremap_resource(struct device *dev, | |
| 708 | + const struct resource *res); | |
| 708 | 709 | |
| 709 | 710 | void __iomem *devm_of_iomap(struct device *dev, |
| 710 | 711 | struct device_node *node, int index, |