Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40670 )
Change subject: arch/x86/acpigen: Add helpers for generating _ADR ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40670/1/src/arch/x86/include/arch/a... File src/arch/x86/include/arch/acpigen.h:
https://review.coreboot.org/c/coreboot/+/40670/1/src/arch/x86/include/arch/a... PS1, Line 374: void acpigen_write_ADR_pci(pci_devfn_t devfn); I think it might be helpful to add two variants of ADR:
pci_devfn(pci_devfn_t devfn) pci_device(const struct device *device).
One can likely call the other, but there's no need for the caller to muck around in struct device to obtain the correct parameter which the expectation that the caller already has a handle to a struct device.