Included in this response is a recommended patch set on top of this patch that resolves a number of issues, including style and a heap corruption bug.
The purpose of this patch set is to refactor the CDAT initialization code to support future patch sets that will introduce multi-region support in CXL Type3 devices. 1) Checkpatch errors in the immediately prior patch 2) Flatting of code in cdat initialization 3) Changes in allocation and error checking for cleanliness 4) Change in the allocation/free strategy of CDAT sub-tables to simplify multi-region allocation in the future. Also resolves a heap corruption bug 5) Refactor of CDAT initialization code into a function that initializes sub-tables per memory-region. Gregory Price (5): hw/mem/cxl_type3: fix checkpatch errors hw/mem/cxl_type3: Pull validation checks ahead of functional code hw/mem/cxl_type3: CDAT pre-allocate and check resources prior to work hw/mem/cxl_type3: Change the CDAT allocation/free strategy hw/mem/cxl_type3: Refactor CDAT sub-table entry initialization into a function hw/mem/cxl_type3.c | 240 +++++++++++++++++++++++---------------------- 1 file changed, 122 insertions(+), 118 deletions(-) -- 2.37.3