From: Davidlohr Bueso <[email protected]> ... this is unused, unlike its write counterpart.
Scope needs to be added to avoid _Static_assert() immediately after a label. c23 makes this valid but before then it is compiler dependent. Suggested-by: [email protected] Tested-by: Dongjoo Seo <[email protected]> Signed-off-by: Davidlohr Bueso <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]> --- v7: Add scope to avoid pre C23 issue. hw/cxl/cxl-component-utils.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c index a7d36e1128c2..07aabe331c44 100644 --- a/hw/cxl/cxl-component-utils.c +++ b/hw/cxl/cxl-component-utils.c @@ -68,11 +68,7 @@ static uint64_t cxl_cache_mem_read_reg(void *opaque, hwaddr offset, ComponentRegisters *cregs = &cxl_cstate->crb; switch (size) { - case 4: - if (cregs->special_ops && cregs->special_ops->read) { - return cregs->special_ops->read(cxl_cstate, offset, 4); - } - + case 4: { QEMU_BUILD_BUG_ON(sizeof(*cregs->cache_mem_registers) != 4); if (offset == A_CXL_BI_RT_STATUS || @@ -105,6 +101,7 @@ static uint64_t cxl_cache_mem_read_reg(void *opaque, hwaddr offset, } return cregs->cache_mem_registers[offset / 4]; + } case 8: qemu_log_mask(LOG_UNIMP, "CXL 8 byte cache mem registers not implemented\n"); -- 2.51.0
