aboutsummaryrefslogtreecommitdiff
path: root/hw/cxl/cxl-device-utils.c
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2023-09-25 16:22:58 +0100
committerMarkus Armbruster <armbru@redhat.com>2023-10-06 10:56:54 +0200
commita97bcfea7e1e275d17bff06b7d2544d7ecbeb489 (patch)
treea61eba790a142dfb48d4429393bcdebd8fbd582f /hw/cxl/cxl-device-utils.c
parent2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d (diff)
hw/cxl: Fix local variable shadowing of cap_hdrs
Rename the version not burried in the macro to cap_h. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-ID: <20230925152258.5444-1-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/cxl/cxl-device-utils.c')
-rw-r--r--hw/cxl/cxl-device-utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/cxl/cxl-device-utils.c b/hw/cxl/cxl-device-utils.c
index 517f06d869..bd68328032 100644
--- a/hw/cxl/cxl-device-utils.c
+++ b/hw/cxl/cxl-device-utils.c
@@ -283,13 +283,13 @@ static void memdev_reg_init_common(CXLDeviceState *cxl_dstate) { }
void cxl_device_register_init_common(CXLDeviceState *cxl_dstate)
{
- uint64_t *cap_hdrs = cxl_dstate->caps_reg_state64;
+ uint64_t *cap_h = cxl_dstate->caps_reg_state64;
const int cap_count = 3;
/* CXL Device Capabilities Array Register */
- ARRAY_FIELD_DP64(cap_hdrs, CXL_DEV_CAP_ARRAY, CAP_ID, 0);
- ARRAY_FIELD_DP64(cap_hdrs, CXL_DEV_CAP_ARRAY, CAP_VERSION, 1);
- ARRAY_FIELD_DP64(cap_hdrs, CXL_DEV_CAP_ARRAY, CAP_COUNT, cap_count);
+ ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_ID, 0);
+ ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_VERSION, 1);
+ ARRAY_FIELD_DP64(cap_h, CXL_DEV_CAP_ARRAY, CAP_COUNT, cap_count);
cxl_device_cap_init(cxl_dstate, DEVICE_STATUS, 1, 2);
device_reg_init_common(cxl_dstate);