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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 17, 2016 at 6:03 AM, Jérémy Lefaure
<jeremy.lefaure@xxxxxxxxxxxx> 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@xxxxxxxxxxxx>
> ---

Sorry for delayed response.

Acked-by: Vaibhav Hiremath <hvaibhav.linux@xxxxxxxxx>

Thanks,
Vaibhav

>  drivers/staging/greybus/arche-apb-ctrl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/greybus/arche-apb-ctrl.c b/drivers/staging/greybus/arche-apb-ctrl.c
> index 3fda0cd6bb42..17fa29061e5b 100644
> --- a/drivers/staging/greybus/arche-apb-ctrl.c
> +++ b/drivers/staging/greybus/arche-apb-ctrl.c
> @@ -461,7 +461,7 @@ static int arche_apb_ctrl_remove(struct platform_device *pdev)
>         return 0;
>  }
>
> -static int arche_apb_ctrl_suspend(struct device *dev)
> +static int __maybe_unused arche_apb_ctrl_suspend(struct device *dev)
>  {
>         /*
>          * If timing profile permits, we may shutdown bridge
> @@ -475,7 +475,7 @@ static int arche_apb_ctrl_suspend(struct device *dev)
>         return 0;
>  }
>
> -static int arche_apb_ctrl_resume(struct device *dev)
> +static int __maybe_unused arche_apb_ctrl_resume(struct device *dev)
>  {
>         /*
>          * Atleast for ES2 we have to meet the delay requirement between
> --
> 2.11.0
>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux