On 25.02.19 13:55, Linus Walleij wrote: > The build servers and linux-next are complaining like this: > > drivers/gpio/gpio-amd-fch.c: In function 'amd_fch_gpio_probe': > drivers/gpio/gpio-amd-fch.c:164:49: warning: passing argument 2 of > 'devm_ioremap_resource' discards 'const' qualifier from pointer > target type [-Wdiscarded-qualifiers] > priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores); hmm, strange that it doesn't come up on my builds. Do did you pass some extra cflags ? Maybe we should talk to kbuild maintainer on adding -Wdiscarded-qualifiers per default ? > Let's just remove "const" for now. ACK. > It is possible that devm_ioremap_resource() should rather > be constified so we can pass const resources as arguments. Indeed. Actually, we could even make it initconst, as it doesn't keep any pointer - instead if just reads out the size and start fields and then forgets about the struct. Maybe we could even pass the struct directly (instead of ptr), as it's very small anyways. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@xxxxxxxxx -- +49-151-27565287