aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-12-18 07:42:45 -0600
committerPaolo Bonzini <pbonzini@redhat.com>2024-12-19 19:35:49 +0100
commit1088d41795101479e2d88f1e6140071732f9bdb3 (patch)
tree8c992af56bd4302efdce5fec32e5a74a9fa07b09 /hw
parent5f9976486970b0fec50ff4c07da7af620cd7d0a0 (diff)
downloadqemu-1088d41795101479e2d88f1e6140071732f9bdb3.zip
qemu-1088d41795101479e2d88f1e6140071732f9bdb3.tar.gz
qemu-1088d41795101479e2d88f1e6140071732f9bdb3.tar.bz2
hw/core: Remove device_class_set_props function
All uses of device_class_set_props() are now using arrays. Validate this compile-time in the device_class_set_props macro and call device_class_set_props_n using the known size of the array. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Link: https://lore.kernel.org/r/20241218134251.4724-19-richard.henderson@linaro.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/core/qdev-properties.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 31e3072..a3d49e2 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -1058,22 +1058,6 @@ static void qdev_class_add_legacy_property(DeviceClass *dc, const Property *prop
NULL, NULL, (Property *)prop);
}
-void (device_class_set_props)(DeviceClass *dc, const Property *props)
-{
- const Property *prop;
- size_t n;
-
- dc->props_ = props;
- for (prop = props, n = 0; prop && prop->name; prop++, n++) {
- qdev_class_add_legacy_property(dc, prop);
- qdev_class_add_property(dc, prop->name, prop);
- }
-
- /* We used a hole in DeviceClass because that's still a lot. */
- assert(n <= UINT16_MAX);
- dc->props_count_ = n;
-}
-
void device_class_set_props_n(DeviceClass *dc, const Property *props, size_t n)
{
/* We used a hole in DeviceClass because that's still a lot. */