Re: [PATCH v2 04/16] ACPI: property: Return present device nodes only on fwnode interface
From: Jonathan Cameron
Date: Mon Sep 29 2025 - 05:36:05 EST
On Wed, 24 Sep 2025 10:45:50 +0300
Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx>
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@xxxxxxxxxx>