Linux USB
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH v1 3/3] ACPI: glue: Simplify struct acpi_dev_type and its usage
Date: Wed, 04 Nov 2026 20:20:19 +0000	[thread overview]
Message-ID: <sashiko-outbox-198005@kernel.org> (raw)
In-Reply-To: <8036646.EvYhyI6sBW@rafael.j.wysocki>

> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> 
> All of the current users of struct acpi_dev_type match the device type
> in their .match() callbacks and all of them use const device type
> pointers for that which means that the structure can be simplified and
> used in a more straightforward way.
> 
> Namely, modify struct acpi_dev_type to contain a const device type
> pointer instead of the .match() callback and remove the name field
> from it.  Next, update the users of struct acpi_dev_type to register
> a separate object of that type for each device type that requires an
> ACPI companion lookup.
> 
> Since the register_acpi_dev_type() and unregister_acpi_dev_type()
> function bodies are rewiritten entirely anyway, make them use
> guard(rwsem_write) instead of down_write()/up_write() pairs and
> print the messages under the semaphore to ensure that the struct
> acpi_dev_type objects they refer to will not be freed prematurely.
> 
> No intentional functional impact beyond messaging.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/3471545.44csPzL39Z@rafael.j.wysocki?part=3


      reply	other threads:[~2026-11-04 20:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 20:09 [PATCH v1 0/3] ACPI: glue: Rework ACPI companion lookup related to device type Rafael J. Wysocki
2026-11-04 20:11 ` [PATCH v1 1/3] ACPI: glue: Rename struct acpi_bus_type to acpi_dev_type Rafael J. Wysocki
2026-11-04 20:18   ` sashiko-bot
2026-11-04 20:13 ` [PATCH v1 2/3] ACPI: glue: Change (un)register_acpi_dev_type() to void functions Rafael J. Wysocki
2026-11-04 20:18   ` sashiko-bot
2026-11-04 20:14 ` [PATCH v1 3/3] ACPI: glue: Simplify struct acpi_dev_type and its usage Rafael J. Wysocki
2026-11-04 20:20   ` sashiko-bot [this message]

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=sashiko-outbox-198005@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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