Re: [PATCH] usb: dwc3: qcom: use modern PM macros

From: Abel Vesa
Date: Thu Apr 24 2025 - 03:04:24 EST


On 25-04-23 18:26:09, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> The use of the old SET_SYSTEM_SLEEP_PM_OPS/SET_RUNTIME_PM_OPS macros
> without __maybe_unused annotations causes warnings when build testing
> without CONFIG_PM:
>
> drivers/usb/dwc3/dwc3-qcom.c:421:12: error: unused function 'dwc3_qcom_suspend' [-Werror,-Wunused-function]
> 421 | static int dwc3_qcom_suspend(struct dwc3_qcom *qcom, bool wakeup)
> | ^~~~~~~~~~~~~~~~~
> drivers/usb/dwc3/dwc3-qcom.c:457:12: error: unused function 'dwc3_qcom_resume' [-Werror,-Wunused-function]
> 457 | static int dwc3_qcom_resume(struct dwc3_qcom *qcom, bool wakeup)
>
> Change these to the modern SYSTEM_SLEEP_PM_OPS/RUNTIME_PM_OPS/pm_ptr
> macros, which avoids the warnings and improves readability at the same
> time.
>
> Fixes: 1881a32fe14d ("usb: dwc3: qcom: Transition to flattened model")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Reviewed-by: Abel Vesa <abel.vesa@xxxxxxxxxx>