All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Tariq Toukan <ttoukan.linux@gmail.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Linus Walleij <linus.walleij@linaro.org>,
	Peng Fan <peng.fan@nxp.com>, Tariq Toukan <tariqt@nvidia.com>,
	Ran Rozenstein <ranro@nvidia.com>,
	gal@nvidia.com, Leon Romanovsky <leonro@nvidia.com>,
	Saeed Mahameed <saeedm@nvidia.com>
Subject: Re: Compilation failure in gpio-vf610.c
Date: Tue, 5 Jul 2022 11:20:10 +0200	[thread overview]
Message-ID: <CAHp75VdSzQzCCZzpsRsdFCKx6jwJo5kBxwm+1DGjdh+NBebrcg@mail.gmail.com> (raw)
In-Reply-To: <759f46a2-c376-17f3-30b5-ac2619e947e1@gmail.com>

On Tue, Jul 5, 2022 at 9:01 AM Tariq Toukan <ttoukan.linux@gmail.com> wrote:

> Recently we started seeing the compilation error:
>
> drivers/gpio/gpio-vf610.c: In function ‘vf610_gpio_direction_input’:
> drivers/gpio/gpio-vf610.c:120:9: error: implicit declaration of function
> ‘pinctrl_gpio_direction_input’; did you mean
> ‘vf610_gpio_direction_input’? [-Werror=implicit-function-declaration]
>    120 |  return pinctrl_gpio_direction_input(chip->base + gpio);
>        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>        |         vf610_gpio_direction_input
>
>
> Is it a known issue? Is there a fix we can cherry-pick?
>
> Offending patch:
>
> commit 30a35c07d9e9affaebd557c454df98e5ba269776
> Author: Peng Fan <peng.fan@nxp.com>
> Date:   Mon Apr 25 19:11:35 2022 +0800
>
>      gpio: vf610: drop the SOC_VF610 dependency for GPIO_VF610
>
>      i.MX7ULP, i.MX8 and i.MX9 use this driver, so drop
>      the SOC_VF610 dependcy to make the driver could be built
>      for i.MX platform.
>
>      Signed-off-by: Peng Fan <peng.fan@nxp.com>
>      Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
>
> This seems to solve the issue.
> Is it the proper way for solving this?
>
> diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
> index 23cddb265a0d..9db42f6a2043 100644
> --- a/drivers/gpio/gpio-vf610.c
> +++ b/drivers/gpio/gpio-vf610.c
> @@ -19,6 +19,7 @@
>   #include <linux/of.h>
>   #include <linux/of_device.h>
>   #include <linux/of_irq.h>
> +#include <linux/pinctrl/consumer.h>
>
>   #define VF610_GPIO_PER_PORT            32

Missed header is an issue. The rule of thumb is to include headers we
are direct users of. Your fix is legit in my opinion. Can you submit a
formal patch with the Fixes tag added?


-- 
With Best Regards,
Andy Shevchenko

      parent reply	other threads:[~2022-07-05  9:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05  7:00 Compilation failure in gpio-vf610.c Tariq Toukan
2022-07-05  7:02 ` Peng Fan
2022-07-05  7:06   ` Tariq Toukan
2022-07-05  9:38     ` Peng Fan
2022-07-05  9:20 ` Andy Shevchenko [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=CAHp75VdSzQzCCZzpsRsdFCKx6jwJo5kBxwm+1DGjdh+NBebrcg@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=gal@nvidia.com \
    --cc=leonro@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=ranro@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=ttoukan.linux@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.