* [PATCH] gpio: shared: extend the ifdef guard to gpio_shared_find_entry()
@ 2025-11-18 10:54 Bartosz Golaszewski
2025-11-19 7:34 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-11-18 10:54 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski
Cc: linux-gpio, linux-kernel, Bartosz Golaszewski, kernel test robot
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
While this function is supposed to be used by all scanning functions, so
far we only have a single one for OF trees. Once we add support for ACPI
and software nodes, we'll drop the CONFIG_OF guard around this routine
but in order to avoid build warnings, let's extend it to cover it in the
meantime.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511180232.EItKeYjY-lkp@intel.com/
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/gpio/gpiolib-shared.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c
index c22eaf05eef23a7f5f111708c3db9412c4c30231..0c07829cd898e4ce19bb5b7156e12982ae674841 100644
--- a/drivers/gpio/gpiolib-shared.c
+++ b/drivers/gpio/gpiolib-shared.c
@@ -58,6 +58,7 @@ static LIST_HEAD(gpio_shared_list);
static DEFINE_MUTEX(gpio_shared_lock);
static DEFINE_IDA(gpio_shared_ida);
+#if IS_ENABLED(CONFIG_OF)
static struct gpio_shared_entry *
gpio_shared_find_entry(struct fwnode_handle *controller_node,
unsigned int offset)
@@ -72,7 +73,6 @@ gpio_shared_find_entry(struct fwnode_handle *controller_node,
return NULL;
}
-#if IS_ENABLED(CONFIG_OF)
static int gpio_shared_of_traverse(struct device_node *curr)
{
struct gpio_shared_entry *entry;
---
base-commit: b32b526a0d034be69d115fae3051dda915d846ee
change-id: 20251118-gpiolib-shared-of-guard-f61e05328940
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio: shared: extend the ifdef guard to gpio_shared_find_entry()
2025-11-18 10:54 [PATCH] gpio: shared: extend the ifdef guard to gpio_shared_find_entry() Bartosz Golaszewski
@ 2025-11-19 7:34 ` Bartosz Golaszewski
0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2025-11-19 7:34 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski
Cc: Bartosz Golaszewski, linux-gpio, linux-kernel, kernel test robot
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Tue, 18 Nov 2025 11:54:51 +0100, Bartosz Golaszewski wrote:
> While this function is supposed to be used by all scanning functions, so
> far we only have a single one for OF trees. Once we add support for ACPI
> and software nodes, we'll drop the CONFIG_OF guard around this routine
> but in order to avoid build warnings, let's extend it to cover it in the
> meantime.
>
>
> [...]
Applied, thanks!
[1/1] gpio: shared: extend the ifdef guard to gpio_shared_find_entry()
https://git.kernel.org/brgl/linux/c/8ad236f8a457c88906261411bcafa1a91fa96124
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-19 7:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-18 10:54 [PATCH] gpio: shared: extend the ifdef guard to gpio_shared_find_entry() Bartosz Golaszewski
2025-11-19 7:34 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).