From 0aa4bd6aebf1dc951da5c5b762eff13c8d37f768 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 4 Sep 2024 13:18:24 +0200 Subject: qapi/machine: Drop temporary 'prefix' Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves HmatLBDataType's generated enumeration constant prefix from HMATLB_DATA_TYPE to HMAT_LB_DATA_TYPE, and HmatLBMemoryHierarchy's from HMATLB_MEMORY_HIERARCHY to HMAT_LB_MEMORY_HIERARCHY. Signed-off-by: Markus Armbruster Reviewed-by: Zhao Liu Message-ID: <20240904111836.3273842-8-armbru@redhat.com> --- hw/core/numa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/core') diff --git a/hw/core/numa.c b/hw/core/numa.c index f8ce332..fb81c1e 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -249,7 +249,7 @@ void parse_numa_hmat_lb(NumaState *numa_state, NumaHmatLBOptions *node, lb_data.initiator = node->initiator; lb_data.target = node->target; - if (node->data_type <= HMATLB_DATA_TYPE_WRITE_LATENCY) { + if (node->data_type <= HMAT_LB_DATA_TYPE_WRITE_LATENCY) { /* Input latency data */ if (!node->has_latency) { @@ -313,7 +313,7 @@ void parse_numa_hmat_lb(NumaState *numa_state, NumaHmatLBOptions *node, numa_info[node->target].lb_info_provided |= BIT(0); } lb_data.data = node->latency; - } else if (node->data_type >= HMATLB_DATA_TYPE_ACCESS_BANDWIDTH) { + } else if (node->data_type >= HMAT_LB_DATA_TYPE_ACCESS_BANDWIDTH) { /* Input bandwidth data */ if (!node->has_bandwidth) { error_setg(errp, "Missing 'bandwidth' option"); -- cgit v1.1 From 32cfefb904cae766d56adf7a802bc1ce2ddf2440 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 4 Sep 2024 13:18:26 +0200 Subject: qapi/machine: Rename CpuS390* to S390Cpu*, and drop 'prefix' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QAPI's 'prefix' feature can make the connection between enumeration type and its constants less than obvious. It's best used with restraint. CpuS390Entitlement has a 'prefix' to change the generated enumeration constants' prefix from CPU_S390_ENTITLEMENT to S390_CPU_ENTITLEMENT. Rename the type to S390CpuEntitlement, so that 'prefix' is not needed. Likewise change CpuS390Polarization to S390CpuPolarization, and CpuS390State to S390CpuState. Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé Reviewed-by: Zhao Liu Acked-by: Thomas Huth Message-ID: <20240904111836.3273842-10-armbru@redhat.com> --- hw/core/qdev-properties-system.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/core') diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c index f13350b..f2db204 100644 --- a/hw/core/qdev-properties-system.c +++ b/hw/core/qdev-properties-system.c @@ -1188,12 +1188,12 @@ const PropertyInfo qdev_prop_uuid = { /* --- s390 cpu entitlement policy --- */ -QEMU_BUILD_BUG_ON(sizeof(CpuS390Entitlement) != sizeof(int)); +QEMU_BUILD_BUG_ON(sizeof(S390CpuEntitlement) != sizeof(int)); const PropertyInfo qdev_prop_cpus390entitlement = { - .name = "CpuS390Entitlement", + .name = "S390CpuEntitlement", .description = "low/medium (default)/high", - .enum_table = &CpuS390Entitlement_lookup, + .enum_table = &S390CpuEntitlement_lookup, .get = qdev_propinfo_get_enum, .set = qdev_propinfo_set_enum, .set_default_value = qdev_propinfo_set_default_value_enum, -- cgit v1.1