* [PATCH] [v2] pinctrl: intel: mark intel_pin_to_gpio __maybe_unused
@ 2019-09-06 18:51 Arnd Bergmann
2019-09-09 3:11 ` Chris Chiu
2019-09-09 9:22 ` Andy Shevchenko
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2019-09-06 18:51 UTC (permalink / raw)
To: Mika Westerberg, Andy Shevchenko, Linus Walleij
Cc: Arnd Bergmann, Chris Chiu, Kai-Heng Feng, linux-gpio, linux-kernel
The intel_pin_to_gpio() function is only called by the
PM support functions and causes a warning when those are disabled:
drivers/pinctrl/intel/pinctrl-intel.c:841:12: error: unused function 'intel_pin_to_gpio' [-Werror,-Wunused-function]
Mark it __maybe_unused to suppress the warning.
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: use __maybe_unused instead of moving the code
---
drivers/pinctrl/intel/pinctrl-intel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index d66fe2b4221b..1f13bcd0e4e1 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -838,7 +838,7 @@ static int intel_gpio_to_pin(struct intel_pinctrl *pctrl, unsigned int offset,
*
* Translate the pin number of pinctrl to GPIO offset
*/
-static int intel_pin_to_gpio(struct intel_pinctrl *pctrl, int pin)
+static __maybe_unused int intel_pin_to_gpio(struct intel_pinctrl *pctrl, int pin)
{
const struct intel_community *community;
const struct intel_padgroup *padgrp;
--
2.20.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] [v2] pinctrl: intel: mark intel_pin_to_gpio __maybe_unused
2019-09-06 18:51 [PATCH] [v2] pinctrl: intel: mark intel_pin_to_gpio __maybe_unused Arnd Bergmann
@ 2019-09-09 3:11 ` Chris Chiu
2019-09-09 9:22 ` Andy Shevchenko
1 sibling, 0 replies; 4+ messages in thread
From: Chris Chiu @ 2019-09-09 3:11 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij, Kai-Heng Feng,
open list:PIN CONTROL SUBSYSTEM, Linux Kernel
On Sat, Sep 7, 2019 at 2:52 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> The intel_pin_to_gpio() function is only called by the
> PM support functions and causes a warning when those are disabled:
>
> drivers/pinctrl/intel/pinctrl-intel.c:841:12: error: unused function 'intel_pin_to_gpio' [-Werror,-Wunused-function]
>
> Mark it __maybe_unused to suppress the warning.
>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [v2] pinctrl: intel: mark intel_pin_to_gpio __maybe_unused
2019-09-06 18:51 [PATCH] [v2] pinctrl: intel: mark intel_pin_to_gpio __maybe_unused Arnd Bergmann
2019-09-09 3:11 ` Chris Chiu
@ 2019-09-09 9:22 ` Andy Shevchenko
2019-09-09 10:22 ` Mika Westerberg
1 sibling, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2019-09-09 9:22 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Mika Westerberg, Linus Walleij, Chris Chiu, Kai-Heng Feng,
linux-gpio, linux-kernel
On Fri, Sep 06, 2019 at 08:51:59PM +0200, Arnd Bergmann wrote:
> The intel_pin_to_gpio() function is only called by the
> PM support functions and causes a warning when those are disabled:
>
> drivers/pinctrl/intel/pinctrl-intel.c:841:12: error: unused function 'intel_pin_to_gpio' [-Werror,-Wunused-function]
>
> Mark it __maybe_unused to suppress the warning.
>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: use __maybe_unused instead of moving the code
> ---
> drivers/pinctrl/intel/pinctrl-intel.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
> index d66fe2b4221b..1f13bcd0e4e1 100644
> --- a/drivers/pinctrl/intel/pinctrl-intel.c
> +++ b/drivers/pinctrl/intel/pinctrl-intel.c
> @@ -838,7 +838,7 @@ static int intel_gpio_to_pin(struct intel_pinctrl *pctrl, unsigned int offset,
> *
> * Translate the pin number of pinctrl to GPIO offset
> */
> -static int intel_pin_to_gpio(struct intel_pinctrl *pctrl, int pin)
> +static __maybe_unused int intel_pin_to_gpio(struct intel_pinctrl *pctrl, int pin)
> {
> const struct intel_community *community;
> const struct intel_padgroup *padgrp;
> --
> 2.20.0
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [v2] pinctrl: intel: mark intel_pin_to_gpio __maybe_unused
2019-09-09 9:22 ` Andy Shevchenko
@ 2019-09-09 10:22 ` Mika Westerberg
0 siblings, 0 replies; 4+ messages in thread
From: Mika Westerberg @ 2019-09-09 10:22 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Arnd Bergmann, Linus Walleij, Chris Chiu, Kai-Heng Feng,
linux-gpio, linux-kernel
On Mon, Sep 09, 2019 at 12:22:11PM +0300, Andy Shevchenko wrote:
> On Fri, Sep 06, 2019 at 08:51:59PM +0200, Arnd Bergmann wrote:
> > The intel_pin_to_gpio() function is only called by the
> > PM support functions and causes a warning when those are disabled:
> >
> > drivers/pinctrl/intel/pinctrl-intel.c:841:12: error: unused function 'intel_pin_to_gpio' [-Werror,-Wunused-function]
> >
> > Mark it __maybe_unused to suppress the warning.
> >
>
> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-09 10:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 18:51 [PATCH] [v2] pinctrl: intel: mark intel_pin_to_gpio __maybe_unused Arnd Bergmann
2019-09-09 3:11 ` Chris Chiu
2019-09-09 9:22 ` Andy Shevchenko
2019-09-09 10:22 ` Mika Westerberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).