From: Marco Felsch <m.felsch@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] gpio: Fix unused variable warning
Date: Wed, 25 Jan 2023 10:13:15 +0100 [thread overview]
Message-ID: <20230125091315.ora7driiwms6qwds@pengutronix.de> (raw)
In-Reply-To: <20230125080946.1999359-1-s.hauer@pengutronix.de>
On 23-01-25, Sascha Hauer wrote:
> gpio_suffixes is only used inside #ifdef CONFIG_OFDEVICE, so put
> it into this ifdef as well.
>
> Fixes: 9fb2fa240d58 ("gpiolib: implement dev_gpiod_get_index")
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> drivers/gpio/gpiolib.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index 4e8244b25f..2e7a39b475 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -537,12 +537,12 @@ static int of_gpiochip_scan_hogs(struct gpio_chip *chip)
> return 0;
> }
>
> +#ifdef CONFIG_OFDEVICE
> static const char *gpio_suffixes[] = {
> "gpios",
> "gpio",
> };
>
> -#ifdef CONFIG_OFDEVICE
> /* Linux compatibility helper: Get a GPIO descriptor from device tree */
> int dev_gpiod_get_index(struct device *dev,
> struct device_node *np,
> --
> 2.30.2
>
>
>
prev parent reply other threads:[~2023-01-25 9:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 8:09 Sascha Hauer
2023-01-25 9:13 ` Marco Felsch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230125091315.ora7driiwms6qwds@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox