From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Shenwei Wang <shenwei.wang@nxp.com>,
Arnd Bergmann <arnd@arndb.de>, Andy Shevchenko <andy@kernel.org>,
Marek Vasut <marex@denx.de>, Marc Zyngier <maz@kernel.org>,
Dan Carpenter <error27@gmail.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: mxc: fix unused function warnings
Date: Tue, 18 Jul 2023 22:54:33 +0300 [thread overview]
Message-ID: <CAHp75Ve51WqLoPHnxLf_uAP8zEr=iK2e0s7uLM441gtOqPmQdg@mail.gmail.com> (raw)
In-Reply-To: <20230718193913.3578660-1-arnd@kernel.org>
On Tue, Jul 18, 2023 at 10:39 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The new runtime PM support causes a harmless warning about
> unused functions when runtime PM is disabled:
>
> drivers/gpio/gpio-mxc.c:612:12: error: 'mxc_gpio_runtime_resume' defined but not used [-Werror=unused-function]
> drivers/gpio/gpio-mxc.c:602:12: error: 'mxc_gpio_runtime_suspend' defined but not used [-Werror=unused-function]
>
> Change the driver to use the more modern helper macros that avoid these
> warnings, and remove the now unnecessary __maybe_unused annotations
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Fixes: 3283d820dce64 ("gpio: mxc: add runtime pm support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpio/gpio-mxc.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
> index a9fb6bd9aa6f9..e03fc8d375fe1 100644
> --- a/drivers/gpio/gpio-mxc.c
> +++ b/drivers/gpio/gpio-mxc.c
> @@ -623,7 +623,7 @@ static int mxc_gpio_runtime_resume(struct device *dev)
> return 0;
> }
>
> -static int __maybe_unused mxc_gpio_noirq_suspend(struct device *dev)
> +static int mxc_gpio_noirq_suspend(struct device *dev)
> {
> struct platform_device *pdev = to_platform_device(dev);
> struct mxc_gpio_port *port = platform_get_drvdata(pdev);
> @@ -634,7 +634,7 @@ static int __maybe_unused mxc_gpio_noirq_suspend(struct device *dev)
> return 0;
> }
>
> -static int __maybe_unused mxc_gpio_noirq_resume(struct device *dev)
> +static int mxc_gpio_noirq_resume(struct device *dev)
> {
> struct platform_device *pdev = to_platform_device(dev);
> struct mxc_gpio_port *port = platform_get_drvdata(pdev);
> @@ -647,8 +647,8 @@ static int __maybe_unused mxc_gpio_noirq_resume(struct device *dev)
> }
>
> static const struct dev_pm_ops mxc_gpio_dev_pm_ops = {
> - SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mxc_gpio_noirq_suspend, mxc_gpio_noirq_resume)
> - SET_RUNTIME_PM_OPS(mxc_gpio_runtime_suspend, mxc_gpio_runtime_resume, NULL)
> + NOIRQ_SYSTEM_SLEEP_PM_OPS(mxc_gpio_noirq_suspend, mxc_gpio_noirq_resume)
> + RUNTIME_PM_OPS(mxc_gpio_runtime_suspend, mxc_gpio_runtime_resume, NULL)
> };
>
> static int mxc_gpio_syscore_suspend(void)
> --
> 2.39.2
>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-07-18 19:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 19:39 [PATCH] gpio: mxc: fix unused function warnings Arnd Bergmann
2023-07-18 19:54 ` Andy Shevchenko [this message]
2023-07-19 9:44 ` Dan Carpenter
2023-07-19 11:26 ` Arnd Bergmann
2023-07-19 11:30 ` Dan Carpenter
2023-07-20 15:23 ` Bartosz Golaszewski
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='CAHp75Ve51WqLoPHnxLf_uAP8zEr=iK2e0s7uLM441gtOqPmQdg@mail.gmail.com' \
--to=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=brgl@bgdev.pl \
--cc=error27@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=maz@kernel.org \
--cc=shenwei.wang@nxp.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 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).