Re: [PATCH] gpio: logicvc: use devm_platform_get_and_ioremap_resource()
From: Bartosz Golaszewski
Date: Thu Jul 16 2026 - 10:30:40 EST
On Wed, 15 Jul 2026 01:42:30 +0200, Rosen Penev <rosenp@xxxxxxxxx> 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