lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211014161046.GA2847733@p14s>
Date:   Thu, 14 Oct 2021 10:10:46 -0600
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Ohad Ben-Cohen <ohad@...ery.com>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Shengjiu Wang <shengjiu.wang@....com>,
        Arnd Bergmann <arnd@...db.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        linux-remoteproc@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] remoteproc: imx_dsp_rproc: mark PM functions as
 __maybe_unused

On Thu, Oct 14, 2021 at 09:52:24AM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.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@...db.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ