Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dhruva G <goledhruva@gmail.com>
To: Ulf Hansson <ulf.hansson@oss.qualcomm.com>,
	Sudeep Holla <sudeep.holla@kernel.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	linux-pm@vger.kernel.org
Cc: Abel Vesa <abel.vesa@oss.qualcomm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Christian Loehle <christian.loehle@arm.com>,
	Maulik Shah <maulik.shah@oss.qualcomm.com>,
	Yuanfang Zhang <yuanfang.zhang@oss.qualcomm.com>,
	Sneh Mankad <sneh.mankad@oss.qualcomm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/5] pmdomain: core: Rename genpd_status_on()
Date: Thu, 3 Sep 2026 17:30:28 +0530	[thread overview]
Message-ID: <c00f266d-b6c3-4988-a2b9-72c5e0389317@gmail.com> (raw)
In-Reply-To: <20260901111441.122436-2-ulf.hansson@oss.qualcomm.com>

Hi Ulf,

On 01-09-2026 16:44, Ulf Hansson wrote:
> Let's rename the internal function genpd_status_on() to
> genpd_status_on_unlocked() to clarify its use.
> 
> Suggested-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> Signed-off-by: Ulf Hansson <ulf.hansson@oss.qualcomm.com>
> ---

Optional:
An additional line explaining why this otherwise unnecessary rename exists:

Rename the accessor to leave genpd_status_on() available for a lock-taking wrapper
introduced in a future commit.


> 
> Changes in v2:
> 	- New patch.
> 
> ---
>  drivers/pmdomain/core.c | 25 +++++++++++++------------
>  1 file changed, 13 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c
> index 842c4169e290..6ac1ce18fda3 100644
> --- a/drivers/pmdomain/core.c
> +++ b/drivers/pmdomain/core.c
> @@ -173,7 +173,7 @@ static const struct genpd_lock_ops genpd_raw_spin_ops = {
>  #define genpd_lock_interruptible(p)	p->lock_ops->lock_interruptible(p)
>  #define genpd_unlock(p)			p->lock_ops->unlock(p)
>  
> -#define genpd_status_on(genpd)		(genpd->status == GENPD_STATE_ON)
> +#define genpd_status_on_unlocked(genpd)	(genpd->status == GENPD_STATE_ON)
>  #define genpd_is_irq_safe(genpd)	(genpd->flags & GENPD_FLAG_IRQ_SAFE)
>  #define genpd_is_always_on(genpd)	(genpd->flags & GENPD_FLAG_ALWAYS_ON)
>  #define genpd_is_active_wakeup(genpd)	(genpd->flags & GENPD_FLAG_ACTIVE_WAKEUP)
> @@ -771,7 +771,7 @@ EXPORT_SYMBOL_GPL(dev_pm_genpd_rpm_always_on);
>   * @dev: Device to get the current power status
>   *
>   * This function checks whether the generic power domain associated with the
> - * given device is on or not by verifying if genpd_status_on equals
> + * given device is on or not by verifying if genpd_status_on_unlocked equals
>   * GENPD_STATE_ON.

Since we're fixing this anyway, It should describe comparing genpd->status with GENPD_STATE_ON, not the macro
which expands to that logic ;)

Anyway, nits only, LGTM otherwise.

Reviewed-by: Dhruva Gole <goledhruva@gmail.com>




  reply	other threads:[~2026-09-03 12:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 11:14 [PATCH v2 0/5] pmdomain/cpuidle-psci: Fix behaviours for CPU PM domains Ulf Hansson
2026-09-01 11:14 ` [PATCH v2 1/5] pmdomain: core: Rename genpd_status_on() Ulf Hansson
2026-09-03 12:00   ` Dhruva G [this message]
2026-09-03 12:10     ` Ulf Hansson
2026-09-01 11:14 ` [PATCH v2 2/5] pmdomain: core: Allow a non-CPU device in a CPU PM domain to do power on Ulf Hansson
2026-09-01 11:14 ` [PATCH v2 3/5] pmdomain: core: Add a genpd config to support unknown initial status Ulf Hansson
2026-09-01 11:14 ` [PATCH v2 4/5] cpuidle: psci: Initialize the PM domains in powered off state for OSI Ulf Hansson
2026-09-01 11:14 ` [PATCH v2 5/5] cpuidle: psci: Move initialization a bit earlier in the boot sequence Ulf Hansson
2026-09-01 12:00   ` Abel Vesa
2026-09-03 11:12 ` [PATCH v2 0/5] pmdomain/cpuidle-psci: Fix behaviours for CPU PM domains Yuanfang Zhang

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=c00f266d-b6c3-4988-a2b9-72c5e0389317@gmail.com \
    --to=goledhruva@gmail.com \
    --cc=abel.vesa@oss.qualcomm.com \
    --cc=christian.loehle@arm.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=maulik.shah@oss.qualcomm.com \
    --cc=rafael@kernel.org \
    --cc=sneh.mankad@oss.qualcomm.com \
    --cc=sudeep.holla@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=ulf.hansson@oss.qualcomm.com \
    --cc=yuanfang.zhang@oss.qualcomm.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