[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/41] hw/core/qdev-properties: Constify Property argument to Prop
From: |
Paolo Bonzini |
Subject: |
[PULL 23/41] hw/core/qdev-properties: Constify Property argument to PropertyInfo.print |
Date: |
Thu, 19 Dec 2024 09:32:10 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
There is exactly one instance of this method: print_pci_devfn.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Link:
20241216035109.3486070-24-richard.henderson@linaro.org">https://lore.kernel.org/r/20241216035109.3486070-24-richard.henderson@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/hw/qdev-properties.h | 2 +-
hw/core/qdev-properties-system.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
index 447767688b6..bf27375a3cc 100644
--- a/include/hw/qdev-properties.h
+++ b/include/hw/qdev-properties.h
@@ -34,7 +34,7 @@ struct PropertyInfo {
const char *description;
const QEnumLookup *enum_table;
bool realized_set_allowed; /* allow setting property on realized device */
- int (*print)(Object *obj, Property *prop, char *dest, size_t len);
+ int (*print)(Object *obj, const Property *prop, char *dest, size_t len);
void (*set_default_value)(ObjectProperty *op, const Property *prop);
ObjectProperty *(*create)(ObjectClass *oc, const char *name,
const Property *prop);
diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
index 22ea1ed3583..1034e9b5809 100644
--- a/hw/core/qdev-properties-system.c
+++ b/hw/core/qdev-properties-system.c
@@ -869,7 +869,7 @@ out:
visit_end_alternate(v, (void **) &alt);
}
-static int print_pci_devfn(Object *obj, Property *prop, char *dest,
+static int print_pci_devfn(Object *obj, const Property *prop, char *dest,
size_t len)
{
int32_t *ptr = object_field_prop_ptr(obj, prop);
--
2.47.1
- [PULL 07/41] hw/tricore: Remove empty Property lists, (continued)
- [PULL 07/41] hw/tricore: Remove empty Property lists, Paolo Bonzini, 2024/12/19
- [PULL 13/41] hw/core: Introduce device_class_set_props_n, Paolo Bonzini, 2024/12/19
- [PULL 15/41] hw/scsi/megasas: Use device_class_set_props_n, Paolo Bonzini, 2024/12/19
- [PULL 14/41] migration: Use device_class_set_props_n, Paolo Bonzini, 2024/12/19
- [PULL 16/41] hw/arm/armsse: Use device_class_set_props_n, Paolo Bonzini, 2024/12/19
- [PULL 17/41] rust/qemu-api: Use device_class_set_props_n, Paolo Bonzini, 2024/12/19
- [PULL 18/41] hw/core: Replace device_class_set_props with a macro, Paolo Bonzini, 2024/12/19
- [PULL 19/41] target/riscv: Do not abuse DEFINE_PROP_END_OF_LIST, Paolo Bonzini, 2024/12/19
- [PULL 22/41] hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr, Paolo Bonzini, 2024/12/19
- [PULL 21/41] include/hw/qdev-properties: Shrink struct Property, Paolo Bonzini, 2024/12/19
- [PULL 23/41] hw/core/qdev-properties: Constify Property argument to PropertyInfo.print,
Paolo Bonzini <=
- [PULL 24/41] Constify all opaque Property pointers, Paolo Bonzini, 2024/12/19
- [PULL 20/41] include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST, Paolo Bonzini, 2024/12/19
- [PULL 26/41] rust: qom: add possibility of overriding unparent, Paolo Bonzini, 2024/12/19
- [PULL 25/41] rust: qom: put class_init together from multiple ClassInitImpl<>, Paolo Bonzini, 2024/12/19
- [PULL 27/41] rust: rename qemu-api modules to follow C code a bit more, Paolo Bonzini, 2024/12/19
- [PULL 28/41] rust: re-export C types from qemu-api submodules, Paolo Bonzini, 2024/12/19
- [PULL 29/41] rust: tests: allow writing more than one test, Paolo Bonzini, 2024/12/19
- [PULL 30/41] rust: qom: add casting functionality, Paolo Bonzini, 2024/12/19
- [PULL 32/41] rust: qemu-api: add a module to wrap functions and zero-sized closures, Paolo Bonzini, 2024/12/19
- [PULL 33/41] kvm: consistently return 0/-errno from kvm_convert_memory, Paolo Bonzini, 2024/12/19