[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 23/24] hw/core/qdev-properties: Constify Property argument to Pro
From: |
Richard Henderson |
Subject: |
[PATCH 23/24] hw/core/qdev-properties: Constify Property argument to PropertyInfo.print |
Date: |
Sun, 15 Dec 2024 21:51:08 -0600 |
There is exactly one instance of this method: print_pci_devfn.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
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 447767688b..bf27375a3c 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 22ea1ed358..1034e9b580 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.43.0
- [PATCH 15/24] hw/scsi/megasas: Use device_class_set_props_n, (continued)
- [PATCH 15/24] hw/scsi/megasas: Use device_class_set_props_n, Richard Henderson, 2024/12/15
- [PATCH 16/24] hw/arm/armsse: Use device_class_set_props_n, Richard Henderson, 2024/12/15
- [PATCH 17/24] rust/qemu-api: Use device_class_set_props_n, Richard Henderson, 2024/12/15
- [PATCH 14/24] migration: Use device_class_set_props_n, Richard Henderson, 2024/12/15
- [PATCH 19/24] target/riscv: Do not abuse DEFINE_PROP_END_OF_LIST, Richard Henderson, 2024/12/15
- [PATCH 18/24] hw/core: Replace device_class_set_props with a macro, Richard Henderson, 2024/12/15
- [PATCH 21/24] include/hw/qdev-properties: Shrink struct Property, Richard Henderson, 2024/12/15
- [PATCH 20/24] include/hw/qdev-properties: Remove DEFINE_PROP_END_OF_LIST, Richard Henderson, 2024/12/15
- [PATCH 22/24] hw/core/qdev-properties: Constify Property argument to object_field_prop_ptr, Richard Henderson, 2024/12/15
- [PATCH 23/24] hw/core/qdev-properties: Constify Property argument to PropertyInfo.print,
Richard Henderson <=
- [PATCH 24/24] Constify all opaque Property pointers, Richard Henderson, 2024/12/15
- Re: [PATCH 00/24] More Property cleanups, Paolo Bonzini, 2024/12/18