mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] ACPI: Provide !ACPI stub for acpi_device_uid()
@ 2026-09-22 15:26 Robin Murphy
  2026-09-22 17:35 ` Rafael J. Wysocki (Intel)
  0 siblings, 1 reply; 2+ messages in thread
From: Robin Murphy @ 2026-09-22 15:26 UTC (permalink / raw)
  To: rafael; +Cc: lenb, linux-acpi, linux-kernel

While the likes of acpi_dev_uid_to_integer() and acpi_dev_uid_match()
already have stubs for !ACPI, the basic acpi_device_uid() getter does
not. Although calls in portable drivers should already be conditional
on a valid acpi_device in a manner which would usually lead to compile-
time elimination anyway, add a stub for the sake of completeness.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>

---
v2: Distinct non-const definition to avoid further theoretical issues
---
 include/acpi/acpi_bus.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 1a45e0d521d8..d686d09f1678 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -964,6 +964,11 @@ static inline const char *acpi_device_hid(struct acpi_device *device)
 	return "";
 }
 
+static inline char *acpi_device_uid(struct acpi_device *device)
+{
+	return NULL;
+}
+
 static inline bool
 acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld)
 {
-- 
2.54.0.dirty


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] ACPI: Provide !ACPI stub for acpi_device_uid()
  2026-09-22 15:26 [PATCH v2] ACPI: Provide !ACPI stub for acpi_device_uid() Robin Murphy
@ 2026-09-22 17:35 ` Rafael J. Wysocki (Intel)
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki (Intel) @ 2026-09-22 17:35 UTC (permalink / raw)
  To: Robin Murphy; +Cc: rafael, lenb, linux-acpi, linux-kernel

On Tue, Sep 22, 2026 at 5:26 PM Robin Murphy <robin.murphy@arm.com> wrote:
>
> While the likes of acpi_dev_uid_to_integer() and acpi_dev_uid_match()
> already have stubs for !ACPI, the basic acpi_device_uid() getter does
> not. Although calls in portable drivers should already be conditional
> on a valid acpi_device in a manner which would usually lead to compile-
> time elimination anyway, add a stub for the sake of completeness.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
>
> ---
> v2: Distinct non-const definition to avoid further theoretical issues
> ---
>  include/acpi/acpi_bus.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
> index 1a45e0d521d8..d686d09f1678 100644
> --- a/include/acpi/acpi_bus.h
> +++ b/include/acpi/acpi_bus.h
> @@ -964,6 +964,11 @@ static inline const char *acpi_device_hid(struct acpi_device *device)
>         return "";
>  }
>
> +static inline char *acpi_device_uid(struct acpi_device *device)
> +{
> +       return NULL;
> +}
> +
>  static inline bool
>  acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld)
>  {
> --

Applied as 7.4 material, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-22 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 15:26 [PATCH v2] ACPI: Provide !ACPI stub for acpi_device_uid() Robin Murphy
2026-09-22 17:35 ` Rafael J. Wysocki (Intel)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®