Re: [PATCH] gpio: logicvc: use devm_platform_get_and_ioremap_resource()
Bartosz Golaszewski <[email protected]>
| Newsgroups | dev.linux.lists.llvm,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAMRc=MfNZgOgMNC_6Fsho-FytLpjp+_b06vOUVfWcmscK9up6Q@mail.gmail.com> |
On Wed, 15 Jul 2026 01:42:30 +0200, Rosen Penev <[email protected]> said: > In the regmap fallback path, replace of_address_to_resource() plus > devm_ioremap_resource() with devm_platform_get_and_ioremap_resource(), > which looks up the resource and maps it in one call. The helper returns a > pointer to the resource, so update resource_size() to dereference it. > > Drop the now-unused linux/of_address.h include; of_node is still used by > syscon_node_to_regmap() and platform_get_resource() resolves the same MEM > resource that of_address_to_resource(of_node, 0) did. > > Built for ARM (multi_v7_defconfig + CONFIG_GPIO_LOGICVC) with LLVM=1; > drivers/gpio/gpio-logicvc.o compiles cleanly. > That's interesting because I'm seeing this: drivers/gpio/gpio-logicvc.c: In function ‘logicvc_gpio_probe’: drivers/gpio/gpio-logicvc.c:93:13: error: unused variable ‘ret’ [-Werror=unused-variable] 93 | int ret; | ^~~ Bart