Skip to content

Commit

Permalink
remoteproc: imx_dsp_rproc: mark PM functions as __maybe_unused
Browse files Browse the repository at this point in the history
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: ec0e554 ("remoteproc: imx_dsp_rproc: Add remoteproc driver for DSP on i.MX")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20211014075239.3714694-1-arnd@kernel.org
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
  • Loading branch information
Arnd Bergmann authored and Mathieu Poirier committed Oct 14, 2021
1 parent 5621dc3 commit 51063f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/remoteproc/imx_dsp_rproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 51063f5

Please sign in to comment.