Re: [PATCH v2 04/16] ACPI: property: Return present device nodes only on fwnode interface

Jonathan Cameron
2025-09-29T09:36:05Z

On Wed, 24 Sep 2025 10:45:50 +0300
Sakari Ailus <sakari.ailus@linux.intel.com> wrote:

> fwnode_graph_get_next_subnode() may return fwnode backed by ACPI device
> nodes and there has been no check these devices are present in the system,
> unlike there has been on fwnode OF backend. In order to provide consistent
> behaviour towards callers, add a check for device presence by introducing
> a new function acpi_get_next_present_subnode(), used as the
> get_next_child_node() fwnode operation that also checks device node
> presence.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

I think this is fine because of the bit in the ACPI spec that says all
bits are set if _STA is missing. It seems much less likely we'll see
problems with hardware disappearing because _STA is there but says
the device isn't present.

Always a regression risk though :(

With the formatting changes Laurent asked for
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>