Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: nomadik: wrap a local variable in a necessary ifdef

The 'desc' local variable in nmk_gpio_dbg_show_one() is now only used
with CONFIG_PINCTRL_NOMADIK enabled so wrap its declaration with an
appropriate ifdef.

Fixes: ddeb66d2cb10 ("gpio: nomadik: don't print out global GPIO numbers in debugfs callbacks")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509032125.nXBcPuaf-lkp@intel.com/
Link: https://lore.kernel.org/r/20250903131903.95100-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

+2
+2
drivers/gpio/gpio-nomadik.c
··· 400 400 struct gpio_chip *chip, unsigned int offset) 401 401 { 402 402 struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(chip); 403 + #ifdef CONFIG_PINCTRL_NOMADIK 403 404 struct gpio_desc *desc; 405 + #endif 404 406 int mode; 405 407 bool is_out; 406 408 bool data_out;