hw/cxl: Remove register special_ops->read()
... 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: Jonathan.Cameron@huawei.com Tested-by: Dongjoo Seo <dongjoo.seo1@samsung.com> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20260204170936.43959-8-Jonathan.Cameron@huawei.com>
Davidlohr Bueso committed
Feb 4, 2026 at 17:09 UTC
defdfab32c78e8ad134e43494a835e0b3208705b
1 file changed
+2
-5
hw/cxl/cxl-component-utils.c
+2
-5
@@ -68,11 +68,7 @@ static uint64_t cxl_cache_mem_read_reg(void *opaque, hwaddr offset,
68
ComponentRegisters *cregs = &cxl_cstate->crb;
69
70
switch (size) {
71
- case 4:
72
- if (cregs->special_ops && cregs->special_ops->read) {
73
- return cregs->special_ops->read(cxl_cstate, offset, 4);
74
- }
75
-
71
+ case 4: {
72
QEMU_BUILD_BUG_ON(sizeof(*cregs->cache_mem_registers) != 4);
73
74
if (offset == A_CXL_BI_RT_STATUS ||
@@ -105,6 +101,7 @@ static uint64_t cxl_cache_mem_read_reg(void *opaque, hwaddr offset,
101
}
102
103
return cregs->cache_mem_registers[offset / 4];
104
+ }
105
case 8:
106
qemu_log_mask(LOG_UNIMP,
107
"CXL 8 byte cache mem registers not implemented\n");