All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	Takashi Iwai <tiwai@suse.de>, LKML <linux-kernel@vger.kernel.org>,
	Zhang Qilong <zhangqilong3@huawei.com>,
	Frank Li <Frank.Li@nxp.com>, Dhruva Gole <d-gole@ti.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Linux PCI <linux-pci@vger.kernel.org>,
	"Bjorn Helgaas" <helgaas@kernel.org>,
	Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [PATCH v1 0/3] PM: runtime: Wrapper macros for usage counter guards
Date: Mon, 10 Nov 2025 12:06:50 +0000	[thread overview]
Message-ID: <20251110120650.00004de8@huawei.com> (raw)
In-Reply-To: <13883374.uLZWGnKmhe@rafael.j.wysocki>

On Fri, 07 Nov 2025 19:35:09 +0100
"Rafael J. Wysocki" <rafael@kernel.org> wrote:

> Hi All,
> 
> The runtime PM usage counter guards introduced recently:
> 
> https://lore.kernel.org/linux-pm/6196611.lOV4Wx5bFT@rafael.j.wysocki/
> 
> and then fixed:
> 
> https://lore.kernel.org/linux-pm/5943878.DvuYhMxLoT@rafael.j.wysocki/
> 
> should generally work, but using them feels sort of arcane and cryptic
> even though the underlying concept is relatively straightforward.
> 
> For this reason, runtime PM wrapper macros around ACQUIRE() and
> ACQUIRE_ERR() involving the new guards are introduced in this series
> (patch [1/3]) and then used in the code already using the guards (patches
> [2/3] and [3/3]) to make it look more straightforward.
> 
> Thanks!

It's an interesting trade off between completely hiding the magic variables
and verbosity.  The PM_RUNTIME_ACQUIRE_ERR smells like something we'd
expect to be using global state (given no parameters), but it is of
course just local with a magic name.  Will take a little getting
used to but then so does all this cleanup.h magic.  So on balance
I think this is a good change.

Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>

  parent reply	other threads:[~2025-11-10 12:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 18:35 [PATCH v1 0/3] PM: runtime: Wrapper macros for usage counter guards Rafael J. Wysocki
2025-11-07 18:39 ` [PATCH v1 1/3] PM: runtime: Wrapper macros for ACQUIRE()/ACQUIRE_ERR() Rafael J. Wysocki
2025-11-10 16:06   ` Frank Li
2025-11-07 18:40 ` [PATCH v1 2/3] PCI/sysfs: Use PM_RUNTIME_ACQUIRE()/PM_RUNTIME_ACQUIRE_ERR Rafael J. Wysocki
2025-11-07 18:41 ` [PATCH v1 3/3] ACPI: TAD: " Rafael J. Wysocki
2025-11-10 12:06 ` Jonathan Cameron [this message]
2025-11-12  6:39 ` [PATCH v1 0/3] PM: runtime: Wrapper macros for usage counter guards Dhruva Gole
2025-11-12 19:44   ` Rafael J. Wysocki
2025-11-12 21:27     ` dan.j.williams
2025-11-12 21:38       ` Rafael J. Wysocki
2025-11-13 11:26         ` Jonathan Cameron
2025-11-13 11:35       ` Dhruva Gole

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=20251110120650.00004de8@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=Frank.Li@nxp.com \
    --cc=alex.williamson@redhat.com \
    --cc=d-gole@ti.com \
    --cc=dan.j.williams@intel.com \
    --cc=helgaas@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=tiwai@suse.de \
    --cc=zhangqilong3@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.