Skip to content

Commit 51063f5

Browse files
arndbmathieupoirier
authored andcommitted
remoteproc: imx_dsp_rproc: mark PM functions as __maybe_unused
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
1 parent 5621dc3 commit 51063f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/remoteproc/imx_dsp_rproc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ static void imx_dsp_load_firmware(const struct firmware *fw, void *context)
11071107
release_firmware(fw);
11081108
}
11091109

1110-
static int imx_dsp_suspend(struct device *dev)
1110+
static __maybe_unused int imx_dsp_suspend(struct device *dev)
11111111
{
11121112
struct rproc *rproc = dev_get_drvdata(dev);
11131113
struct imx_dsp_rproc *priv = rproc->priv;
@@ -1142,7 +1142,7 @@ static int imx_dsp_suspend(struct device *dev)
11421142
return pm_runtime_force_suspend(dev);
11431143
}
11441144

1145-
static int imx_dsp_resume(struct device *dev)
1145+
static __maybe_unused int imx_dsp_resume(struct device *dev)
11461146
{
11471147
struct rproc *rproc = dev_get_drvdata(dev);
11481148
int ret = 0;

0 commit comments

Comments
 (0)