Skip to contentSkip to conversation

Pin control: core.c Eliminate three compiler warnings

PATCH New Linus Walleij 1 participant 1 message Nov 5, 2020 1 message not in the archive

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

PATCH 1/1 Pin control: core.c Eliminate three compiler warnings

In reply to a message not in the archive

Patch sent directly to me, applied.

Yours,
Linus Walleij

---------- Forwarded message ---------
From: Chris Sorenson <[email protected]>
Date: Sun, Oct 25, 2020 at 5:56 AM
Subject: [PATCH] Pin control: core.c Eliminate three compiler warnings
To: <[email protected]>

Eliminate three "declared but not used" compiler warnings by moving the variable declarations into the #ifdef where they are actually used.

--
drivers/pinctrl/core.c|6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pinctrl/core.c +0 -0
index 3663d87f51a0..e5d742056b03 100644
@@ -1623,6 +1623,9 @@ static int pinctrl_pins_show(struct seq_file *s,

void *what)

                seq_printf(s, "pin %d (%s) ", pin, desc->name);

#ifdef CONFIG_GPIOLIB

+               struct pinctrl_gpio_range *range;
+               unsigned int gpio_num;
+               struct gpio_chip *chip;
                gpio_num = 0;
                list_for_each_entry(range, &pctldev->gpio_ranges, node) {
                        if ((pin >= range->pin_base) &&