hw/cxl: Use a switch to explicitly check size in caps_reg_read()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 23 Oct 2023 14:02:06 +0000 (15:02 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 7 Nov 2023 08:39:11 +0000 (03:39 -0500)
commit629df5cc23cc9aec5d115cc9be3456458e2b44fa
tree6f80c8f09a7647587f7a79438dbfae4e0f87a0e6
parentf58db4eeb1c7f850de86d4efece653d1018f6eae
hw/cxl: Use a switch to explicitly check size in caps_reg_read()

Bring this read function inline with the others that do
check for unexpected size values.

Also reduces line lengths to sub 80 chars.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Message-Id: <20231023140210.3089-2-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/cxl/cxl-device-utils.c