[PATCH] staging: greybus: arche-apb-ctrl: fix unused warnings on resume/suspend

Johan Hovold johan at kernel.org
Mon Jan 2 10:21:23 UTC 2017


On Fri, Dec 16, 2016 at 07:33:02PM -0500, Jérémy Lefaure wrote:
> When CONFIG_PM_SLEEP is disabled, SIMPLE_DEV_PM_OPS does not use
> arche_apb_ctrl_resume and arche_apb_ctrl_suspend functions:
> 
> drivers/staging/greybus/arche-apb-ctrl.c:478:12: warning:
> ‘arche_apb_ctrl_resume’ defined but not used [-Wunused-function]
>  static int arche_apb_ctrl_resume(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~~~
> drivers/staging/greybus/arche-apb-ctrl.c:464:12: warning:
> ‘arche_apb_ctrl_suspend’ defined but not used [-Wunused-function]
>  static int arche_apb_ctrl_suspend(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~~~~
> 
> Adding __maybe_unused to the declaration of these functions removes the
> warnings.
> 
> Signed-off-by: Jérémy Lefaure <jeremy.lefaure at lse.epita.fr>

Acked-by: Johan Hovold <johan at kernel.org>

Thanks,
Johan


More information about the devel mailing list