[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 22/24] hw/core/qdev-properties: Constify Property argument to
From: |
Richard Henderson |
Subject: |
[PATCH v2 22/24] hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr |
Date: |
Wed, 18 Dec 2024 07:42:49 -0600 |
This logically should have accompanied d36f165d952 which
allowed const Property to be registered.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/hw/qdev-properties.h | 2 +-
hw/core/qdev-properties.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
index 3680cd239f..447767688b 100644
--- a/include/hw/qdev-properties.h
+++ b/include/hw/qdev-properties.h
@@ -201,7 +201,7 @@ void qdev_prop_set_enum(DeviceState *dev, const char *name,
int value);
/* Takes ownership of @values */
void qdev_prop_set_array(DeviceState *dev, const char *name, QList *values);
-void *object_field_prop_ptr(Object *obj, Property *prop);
+void *object_field_prop_ptr(Object *obj, const Property *prop);
void qdev_prop_register_global(GlobalProperty *prop);
const GlobalProperty *qdev_find_global_prop(Object *obj,
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index a3d49e2020..61929b2865 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -51,7 +51,7 @@ void qdev_prop_allow_set_link_before_realize(const Object
*obj,
}
}
-void *object_field_prop_ptr(Object *obj, Property *prop)
+void *object_field_prop_ptr(Object *obj, const Property *prop)
{
void *ptr = obj;
ptr += prop->offset;
--
2.43.0
- [PATCH v2 10/24] hw/sparc: Remove empty Property lists, (continued)
- [PATCH v2 10/24] hw/sparc: Remove empty Property lists, Richard Henderson, 2024/12/18
- [PATCH v2 11/24] hw/virtio: Remove empty Property lists, Richard Henderson, 2024/12/18
- [PATCH v2 08/24] hw/s390x: Remove empty Property lists, Richard Henderson, 2024/12/18
- [PATCH v2 14/24] migration: Use device_class_set_props_n, Richard Henderson, 2024/12/18
- [PATCH v2 17/24] rust/qemu-api: Use device_class_set_props_n, Richard Henderson, 2024/12/18
- [PATCH v2 19/24] target/riscv: Do not abuse DEFINE_PROP_END_OF_LIST, Richard Henderson, 2024/12/18
- [PATCH v2 22/24] hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr,
Richard Henderson <=
- [PATCH v2 09/24] hw/xen: Remove empty Property lists, Richard Henderson, 2024/12/18
- [PATCH v2 12/24] include/hw/qdev-core: Detect most empty Property lists at compile time, Richard Henderson, 2024/12/18
- [PATCH v2 13/24] hw/core: Introduce device_class_set_props_n, Richard Henderson, 2024/12/18
- [PATCH v2 15/24] hw/scsi/megasas: Use device_class_set_props_n, Richard Henderson, 2024/12/18
- [PATCH v2 16/24] hw/arm/armsse: Use device_class_set_props_n, Richard Henderson, 2024/12/18
- [PATCH v2 18/24] hw/core: Remove device_class_set_props function, Richard Henderson, 2024/12/18
- [PATCH v2 24/24] Constify all opaque Property pointers, Richard Henderson, 2024/12/18