[PATCH 1/4] drivers: spi: st: remove __maybe_unused for suspend/resume
Jonathan Cameron
jonathan.cameron at huawei.com
Tue Jan 6 09:05:21 PST 2026
On Tue, 6 Jan 2026 13:14:17 +0100
Alain Volmat <alain.volmat at foss.st.com> wrote:
> Remove useless __maybe_unused statements for suspend and resume
> functions since this is now used via pm_ptr.
Patch is fine, but reasoning not quite right. pm_ptr() allows
the dropping of the structure without needing a __maybe_unused
on that, but these are passed to the SYSTEM_SLEEP_PM_OPS()
macro and that is using pm_sleep_ptr().
So tiny description change needed to reflect that. Probably
mention the pm_sleep_ptr() is as part of the macro as that
bit is not totally obvious.
Jonathan
>
> Signed-off-by: Alain Volmat <alain.volmat at foss.st.com>
> ---
> drivers/spi/spi-st-ssc4.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-st-ssc4.c b/drivers/spi/spi-st-ssc4.c
> index c07c61dc4938..b173ef70d77e 100644
> --- a/drivers/spi/spi-st-ssc4.c
> +++ b/drivers/spi/spi-st-ssc4.c
> @@ -403,7 +403,7 @@ static int spi_st_runtime_resume(struct device *dev)
> return ret;
> }
>
> -static int __maybe_unused spi_st_suspend(struct device *dev)
> +static int spi_st_suspend(struct device *dev)
> {
> struct spi_controller *host = dev_get_drvdata(dev);
> int ret;
> @@ -415,7 +415,7 @@ static int __maybe_unused spi_st_suspend(struct device *dev)
> return pm_runtime_force_suspend(dev);
> }
>
> -static int __maybe_unused spi_st_resume(struct device *dev)
> +static int spi_st_resume(struct device *dev)
> {
> struct spi_controller *host = dev_get_drvdata(dev);
> int ret;
>
More information about the linux-arm-kernel
mailing list