All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remoteproc: imx_dsp_rproc: mark PM functions as __maybe_unused
@ 2021-10-14  7:52 ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2021-10-14  7:52 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson, Mathieu Poirier, Shawn Guo,
	Sascha Hauer, Shengjiu Wang
  Cc: Arnd Bergmann, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, linux-remoteproc, linux-arm-kernel, linux-kernel

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(-)

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] remoteproc: imx_dsp_rproc: mark PM functions as __maybe_unused
@ 2021-10-14  7:52 ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2021-10-14  7:52 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson, Mathieu Poirier, Shawn Guo,
	Sascha Hauer, Shengjiu Wang
  Cc: Arnd Bergmann, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, linux-remoteproc, linux-arm-kernel, linux-kernel

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(-)

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] remoteproc: imx_dsp_rproc: mark PM functions as __maybe_unused
  2021-10-14  7:52 ` Arnd Bergmann
@ 2021-10-14 16:10   ` Mathieu Poirier
  -1 siblings, 0 replies; 4+ messages in thread
From: Mathieu Poirier @ 2021-10-14 16:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Ohad Ben-Cohen, Bjorn Andersson, Shawn Guo, Sascha Hauer,
	Shengjiu Wang, Arnd Bergmann, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-remoteproc,
	linux-arm-kernel, linux-kernel

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
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] remoteproc: imx_dsp_rproc: mark PM functions as __maybe_unused
@ 2021-10-14 16:10   ` Mathieu Poirier
  0 siblings, 0 replies; 4+ messages in thread
From: Mathieu Poirier @ 2021-10-14 16:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Ohad Ben-Cohen, Bjorn Andersson, Shawn Guo, Sascha Hauer,
	Shengjiu Wang, Arnd Bergmann, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, linux-remoteproc,
	linux-arm-kernel, linux-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-14 16:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14  7:52 [PATCH] remoteproc: imx_dsp_rproc: mark PM functions as __maybe_unused Arnd Bergmann
2021-10-14  7:52 ` Arnd Bergmann
2021-10-14 16:10 ` Mathieu Poirier
2021-10-14 16:10   ` Mathieu Poirier

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.