From: Raag Jadav <raag.jadav@intel.com>
To: rafael@kernel.org, paul@crapouillou.net,
andriy.shevchenko@linux.intel.com
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Raag Jadav <raag.jadav@intel.com>
Subject: [PATCH v1] PM: Discard runtime_xx() handles using pm_ptr()
Date: Thu, 20 Feb 2025 13:33:18 +0530 [thread overview]
Message-ID: <20250220080318.2660840-1-raag.jadav@intel.com> (raw)
Discard runtime_xx() handles in RUNTIME_PM_OPS() using pm_ptr() macro
and drop unnecessary CONFIG_PM ifdeffery.
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
PS: I'm not very confident about this but thought I'd give it a try.
include/linux/pm.h | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 78855d794342..416561c60e81 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -334,9 +334,9 @@ struct dev_pm_ops {
.restore_noirq = pm_sleep_ptr(resume_fn),
#define RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
- .runtime_suspend = suspend_fn, \
- .runtime_resume = resume_fn, \
- .runtime_idle = idle_fn,
+ .runtime_suspend = pm_ptr(suspend_fn), \
+ .runtime_resume = pm_ptr(resume_fn), \
+ .runtime_idle = pm_ptr(idle_fn),
#ifdef CONFIG_PM_SLEEP
#define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
@@ -359,12 +359,8 @@ struct dev_pm_ops {
#define SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn)
#endif
-#ifdef CONFIG_PM
#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
-#else
-#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn)
-#endif
#define _DEFINE_DEV_PM_OPS(name, \
suspend_fn, resume_fn, \
--
2.34.1
next reply other threads:[~2025-02-20 8:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 8:03 Raag Jadav [this message]
2025-02-20 10:35 ` [PATCH v1] PM: Discard runtime_xx() handles using pm_ptr() kernel test robot
2025-02-20 11:27 ` kernel test robot
2025-02-20 12:15 ` Paul Cercueil
2025-02-20 12:54 ` Raag Jadav
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=20250220080318.2660840-1-raag.jadav@intel.com \
--to=raag.jadav@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=paul@crapouillou.net \
--cc=rafael@kernel.org \
/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