diff mbox series

Pin control: core.c Eliminate three compiler warnings

Message ID CACRpkdYAoWOpory7UrTQ_enE9tpu+xTX+D0ii4FA3kcuDVc0ow@mail.gmail.com
State New
Headers show
Series Pin control: core.c Eliminate three compiler warnings | expand

Commit Message

Linus Walleij Nov. 5, 2020, 10:19 a.m. UTC
Patch sent directly to me, applied.

Yours,
Linus Walleij

---------- Forwarded message ---------
From: Chris Sorenson <csoren@isd.net>
Date: Sun, Oct 25, 2020 at 5:56 AM
Subject: [PATCH] Pin control: core.c Eliminate three compiler warnings
To: <linus.walleij@linaro.org>


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

Signed-off-by: Chris Sorenson <csoren@isd.net>
--
drivers/pinctrl/core.c|6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

                list_for_each_entry(range, &pctldev->gpio_ranges, node) {
                        if ((pin >= range->pin_base) &&
diff mbox series

Patch

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 3663d87f51a0..e5d742056b03 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -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;