[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251031041131.3qmqfitiertc7vdp@scotch>
Date: Thu, 30 Oct 2025 23:11:31 -0500
From: Nishanth Menon <nm@...com>
To: "Thomas Richard (TI.com)" <thomas.richard@...tlin.com>
CC: Tero Kristo <kristo@...nel.org>, Santosh Shilimkar <ssantosh@...nel.org>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>, Gregory CLEMENT
<gregory.clement@...tlin.com>, Richard Genoud <richard.genoud@...tlin.com>,
Udit Kumar <u-kumar1@...com>, Prasanth Mantena <p-mantena@...com>, "Abhash
Kumar" <a-kumar2@...com>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] firmware: ti_sci: replace ifdeffery by pm_sleep_ptr()
macro
On 10:35-20251014, Thomas Richard (TI.com) wrote:
> Using pm_sleep_ptr() macro allows to remove ifdeffery and '__maybe_unused'
> annotations.
>
> Signed-off-by: Thomas Richard (TI.com) <thomas.richard@...tlin.com>
> ---
> drivers/firmware/ti_sci.c | 18 ++++++++----------
> 1 file changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
> index 49fd2ae01055d0f425062147422471f0fd49e4bd..99a2e0e2960f463918950fef8829409ec365ce70 100644
> --- a/drivers/firmware/ti_sci.c
> +++ b/drivers/firmware/ti_sci.c
> @@ -3706,7 +3706,7 @@ static int ti_sci_prepare_system_suspend(struct ti_sci_info *info)
> }
> }
>
> -static int __maybe_unused ti_sci_suspend(struct device *dev)
> +static int ti_sci_suspend(struct device *dev)
> {
> struct ti_sci_info *info = dev_get_drvdata(dev);
> struct device *cpu_dev, *cpu_dev_max = NULL;
> @@ -3746,7 +3746,7 @@ static int __maybe_unused ti_sci_suspend(struct device *dev)
> return 0;
> }
>
> -static int __maybe_unused ti_sci_suspend_noirq(struct device *dev)
> +static int ti_sci_suspend_noirq(struct device *dev)
> {
> struct ti_sci_info *info = dev_get_drvdata(dev);
> int ret = 0;
> @@ -3758,7 +3758,7 @@ static int __maybe_unused ti_sci_suspend_noirq(struct device *dev)
> return 0;
> }
>
> -static int __maybe_unused ti_sci_resume_noirq(struct device *dev)
> +static int ti_sci_resume_noirq(struct device *dev)
> {
> struct ti_sci_info *info = dev_get_drvdata(dev);
> int ret = 0;
> @@ -3780,7 +3780,7 @@ static int __maybe_unused ti_sci_resume_noirq(struct device *dev)
> return 0;
> }
>
> -static void __maybe_unused ti_sci_pm_complete(struct device *dev)
> +static void ti_sci_pm_complete(struct device *dev)
PTR_IF when CONFIG_PM_SLEEP is disabled will result in these static
functions unused, no? should we leave __maybe_unused as is?
> {
> struct ti_sci_info *info = dev_get_drvdata(dev);
>
> @@ -3791,12 +3791,10 @@ static void __maybe_unused ti_sci_pm_complete(struct device *dev)
> }
>
> static const struct dev_pm_ops ti_sci_pm_ops = {
> -#ifdef CONFIG_PM_SLEEP
> - .suspend = ti_sci_suspend,
> - .suspend_noirq = ti_sci_suspend_noirq,
> - .resume_noirq = ti_sci_resume_noirq,
> - .complete = ti_sci_pm_complete,
> -#endif
> + .suspend = pm_sleep_ptr(ti_sci_suspend),
> + .suspend_noirq = pm_sleep_ptr(ti_sci_suspend_noirq),
> + .resume_noirq = pm_sleep_ptr(ti_sci_resume_noirq),
> + .complete = pm_sleep_ptr(ti_sci_pm_complete),
> };
>
> /* Description for K2G */
>
> ---
> base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
> change-id: 20251014-ti-sci-pm-ops-cleanup-1b7ef3f43cbc
>
> Best regards,
> --
> Thomas Richard (TI.com) <thomas.richard@...tlin.com>
>
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
https://ti.com/opensource
Powered by blists - more mailing lists