From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shengjiu Wang <shengjiu.wang@nxp.com>,
Arnd Bergmann <arnd@arndb.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
linux-remoteproc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remoteproc: imx_dsp_rproc: mark PM functions as __maybe_unused
Date: Thu, 14 Oct 2021 10:10:46 -0600 [thread overview]
Message-ID: <20211014161046.GA2847733@p14s> (raw)
In-Reply-To: <20211014075239.3714694-1-arnd@kernel.org>
On Thu, Oct 14, 2021 at 09:52:24AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When CONFIG_PM_SLEEP is disabled, we get a harmless warning:
>
> drivers/remoteproc/imx_dsp_rproc.c:1145:12: error: 'imx_dsp_resume' defined but not used [-Werror=unused-function]
> 1145 | static int imx_dsp_resume(struct device *dev)
> | ^~~~~~~~~~~~~~
> drivers/remoteproc/imx_dsp_rproc.c:1110:12: error: 'imx_dsp_suspend' defined but not used [-Werror=unused-function]
> 1110 | static int imx_dsp_suspend(struct device *dev)
> | ^~~~~~~~~~~~~~~
>
> Mark these as __maybe_unused to get a clean build.
>
> Fixes: ec0e5549f358 ("remoteproc: imx_dsp_rproc: Add remoteproc driver for DSP on i.MX")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/remoteproc/imx_dsp_rproc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
I have applied this.
Thanks,
Mathieu
>
> diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c
> index 63749cfcf22f..90fcb389e252 100644
> --- a/drivers/remoteproc/imx_dsp_rproc.c
> +++ b/drivers/remoteproc/imx_dsp_rproc.c
> @@ -1107,7 +1107,7 @@ static void imx_dsp_load_firmware(const struct firmware *fw, void *context)
> release_firmware(fw);
> }
>
> -static int imx_dsp_suspend(struct device *dev)
> +static __maybe_unused int imx_dsp_suspend(struct device *dev)
> {
> struct rproc *rproc = dev_get_drvdata(dev);
> struct imx_dsp_rproc *priv = rproc->priv;
> @@ -1142,7 +1142,7 @@ static int imx_dsp_suspend(struct device *dev)
> return pm_runtime_force_suspend(dev);
> }
>
> -static int imx_dsp_resume(struct device *dev)
> +static __maybe_unused int imx_dsp_resume(struct device *dev)
> {
> struct rproc *rproc = dev_get_drvdata(dev);
> int ret = 0;
> --
> 2.29.2
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2021-10-14 16:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 7:52 [PATCH] remoteproc: imx_dsp_rproc: mark PM functions as __maybe_unused Arnd Bergmann
2021-10-14 16:10 ` Mathieu Poirier [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=20211014161046.GA2847733@p14s \
--to=mathieu.poirier@linaro.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=ohad@wizery.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=shengjiu.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).