[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VckpCLKeFLbf3RJ+eti5SX6a-ygvR7FM6M2-txp_kmMLQ@mail.gmail.com>
Date: Wed, 28 Oct 2020 13:41:34 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: He Zhe <zhe.he@...driver.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Drew Fustini <drew@...gleboard.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: core: Add missing #ifdef CONFIG_GPIOLIB
On Wed, Oct 28, 2020 at 12:40 PM He Zhe <zhe.he@...driver.com> wrote:
>
> To fix the following build warnings when CONFIG_GPIOLIB=n.
>
> drivers/pinctrl/core.c:1607:20: warning: unused variable 'chip' [-Wunused-variable]
> 1608 | struct gpio_chip *chip;
> | ^~~~
> drivers/pinctrl/core.c:1606:15: warning: unused variable 'gpio_num' [-Wunused-variable]
> 1607 | unsigned int gpio_num;
> | ^~~~~~~~
> drivers/pinctrl/core.c:1605:29: warning: unused variable 'range' [-Wunused-variable]
> 1606 | struct pinctrl_gpio_range *range;
> | ^~~~~
Makes sense.
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
> Fixes: f1b206cf7c57 ("pinctrl: core: print gpio in pins debugfs file")
> Signed-off-by: He Zhe <zhe.he@...driver.com>
> ---
> drivers/pinctrl/core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
> index 3663d87f51a0..9fc4433fece4 100644
> --- a/drivers/pinctrl/core.c
> +++ b/drivers/pinctrl/core.c
> @@ -1602,9 +1602,11 @@ static int pinctrl_pins_show(struct seq_file *s, void *what)
> struct pinctrl_dev *pctldev = s->private;
> const struct pinctrl_ops *ops = pctldev->desc->pctlops;
> unsigned i, pin;
> +#ifdef CONFIG_GPIOLIB
> struct pinctrl_gpio_range *range;
> unsigned int gpio_num;
> struct gpio_chip *chip;
> +#endif
>
> seq_printf(s, "registered pins: %d\n", pctldev->desc->npins);
>
> --
> 2.17.1
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists