[PATCH v2] ACPI: Provide !ACPI stub for acpi_device_uid()

Robin Murphy posted 1 patch 1 day, 22 hours ago
include/acpi/acpi_bus.h | 5 +++++
1 file changed, 5 insertions(+)
[PATCH v2] ACPI: Provide !ACPI stub for acpi_device_uid()
Posted by Robin Murphy 1 day, 22 hours ago
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
Re: [PATCH v2] ACPI: Provide !ACPI stub for acpi_device_uid()
Posted by Rafael J. Wysocki (Intel) 1 day, 20 hours ago
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!