Dave Jiang wrote: > Provide a helper to find the ACPI0017 device in order to issue the _DSM. > The helper will take the 'struct device' from a cxl_port and iterate until > the root device is reached. The ACPI handle will be returned from the root > device. Following on from the last patch this should all be self contained to drivers/cxl/acpi.c with something like: struct cxl_root { struct cxl_port port; cxl_qos_class_fn qos_class; }; ...and then the caller does: port = find_cxl_root(...); root = container_of(port, typeof(*root), port); class = root->qos_class(port, ...); Yes, it means finally creating a formal 'struct cxl_root' type, but I expect it will not be the last root method that gets added.