Skip to contentSkip to conversation

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

PATCH Applied Bartosz Golaszewski 1 participant 2 messages Sep 3, 2025 – Sep 4, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: nomadik: wrap a local variable in a necessary ifdef

From: Bartosz Golaszewski <[email protected]>

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")
---
 drivers/gpio/gpio-nomadik.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpio/gpio-nomadik.c +2 -0
index fde4b416faa8..97c5cd33279d 100644
@@ -400,7 +400,9 @@ void nmk_gpio_dbg_show_one(struct seq_file *s, struct pinctrl_dev *pctldev,
 			   struct gpio_chip *chip, unsigned int offset)
 {
 	struct nmk_gpio_chip *nmk_chip = gpiochip_get_data(chip);
+#ifdef CONFIG_PINCTRL_NOMADIK
 	struct gpio_desc *desc;
+#endif
 	int mode;
 	bool is_out;
 	bool data_out;
Signature · 1 line
2.48.1
author Applied
#1 lore raw

From: Bartosz Golaszewski <[email protected]>

Quoted 5 lines · Bartosz Golaszewski

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.

Applied, thanks!

[1/1] gpio: nomadik: wrap a local variable in a necessary ifdef
(no commit info)

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>