From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Alain Volmat <alain.volmat@foss.st.com>
Cc: Mark Brown <broonie@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
<linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/4] drivers: spi: st: remove __maybe_unused for suspend/resume
Date: Tue, 6 Jan 2026 17:05:21 +0000 [thread overview]
Message-ID: <20260106170521.00001668@huawei.com> (raw)
In-Reply-To: <20260106-spi_st_maybe_unused_removal-v1-1-8f5ca7136e96@foss.st.com>
On Tue, 6 Jan 2026 13:14:17 +0100
Alain Volmat <alain.volmat@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@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;
>
next prev parent reply other threads:[~2026-01-06 17:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 12:14 [PATCH 0/4] drivers: spi: st: use pm_ptr and remove __maybe_unused Alain Volmat
2026-01-06 12:14 ` [PATCH 1/4] drivers: spi: st: remove __maybe_unused for suspend/resume Alain Volmat
2026-01-06 17:05 ` Jonathan Cameron [this message]
2026-01-06 12:14 ` [PATCH 2/4] drivers: spi: stm32-ospi: avoid __maybe_unused and use pm_ptr Alain Volmat
2026-01-06 12:14 ` [PATCH 3/4] drivers: spi: stm32-qspi: " Alain Volmat
2026-01-06 12:14 ` [PATCH 4/4] drivers: spi: stm32: " Alain Volmat
2026-01-06 12:22 ` [PATCH 0/4] drivers: spi: st: use pm_ptr and remove __maybe_unused Mark Brown
2026-01-06 15:13 ` Alain Volmat
2026-01-06 18:25 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260106170521.00001668@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=alain.volmat@foss.st.com \
--cc=alexandre.torgue@foss.st.com \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox