]> xenbits.xensource.com Git - people/aperard/qemu-dm.git/commitdiff
hw/core/qdev-properties: Constify Property argument to PropertyInfo.print
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 18 Dec 2024 13:42:50 +0000 (07:42 -0600)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 19 Dec 2024 18:36:37 +0000 (19:36 +0100)
This logically should have accompanied d36f165d952 which
allowed const Property to be registered.

There is exactly one instance of this method: print_pci_devfn.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Lei Yang <leiyang@redhat.com>
Link: https://lore.kernel.org/r/20241218134251.4724-24-richard.henderson@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/core/qdev-properties-system.c
include/hw/qdev-properties.h

index 22ea1ed3583f8456bd4d3950023c571a85ecc080..1034e9b5809cfdd75e5caf221a8903593cb1f1b6 100644 (file)
@@ -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);
index 447767688b60117b0227672881b684386af1eef5..bf27375a3ccdb238ef3327dd85d3d0a1431cbfbf 100644 (file)
@@ -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);