aboutsummaryrefslogtreecommitdiff
path: root/qom
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-12-11 13:50:35 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-12-11 13:50:35 +0000
commitb785d25e91718a660546a6550f64b3c543af7754 (patch)
treea69f546d903351e4db899b8f080468ff12fe14e0 /qom
parent33744604d768e4281d425baa3ce7128b91319503 (diff)
parent953d0c333e2825656ba1ec5bd1c18bc53485b39c (diff)
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* Fix for NULL segments (Bin Meng) * Support for 32768 CPUs on x86 without IOMMU (David) * PDEP/PEXT fix and testcase (myself) * Remove bios_name and ram_size globals (myself) * qemu_init rationalization (myself) * Update kernel-doc (myself + upstream patches) * Propagate MemTxResult across DMA and PCI functions (Philippe) * Remove master/slave when applicable (Philippe) * WHPX support for in-kernel irqchip (Sunil) # gpg: Signature made Thu 10 Dec 2020 17:21:50 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: (113 commits) scripts: kernel-doc: remove unnecessary change wrt Linux Revert "docs: temporarily disable the kernel-doc extension" scripts: kernel-doc: use :c:union when needed scripts: kernel-doc: split typedef complex regex scripts: kernel-doc: fix typedef parsing Revert "kernel-doc: Handle function typedefs that return pointers" Revert "kernel-doc: Handle function typedefs without asterisks" scripts: kernel-doc: try to use c:function if possible scripts: kernel-doc: fix line number handling scripts: kernel-doc: allow passing desired Sphinx C domain dialect scripts: kernel-doc: don't mangle with parameter list scripts: kernel-doc: fix typedef identification scripts: kernel-doc: reimplement -nofunction argument scripts: kernel-doc: fix troubles with line counts scripts: kernel-doc: use a less pedantic markup for funcs on Sphinx 3.x scripts: kernel-doc: make it more compatible with Sphinx 3.x Revert "kernel-doc: Use c:struct for Sphinx 3.0 and later" Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments" scripts: kernel-doc: add support for typedef enum kernel-doc: add support for ____cacheline_aligned attribute ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qom')
-rw-r--r--qom/object.c36
1 files changed, 7 insertions, 29 deletions
diff --git a/qom/object.c b/qom/object.c
index e73d70a993..f2ae6e6b2a 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -2175,11 +2175,10 @@ static void property_set_str(Object *obj, Visitor *v, const char *name,
g_free(value);
}
-static void property_release_str(Object *obj, const char *name,
- void *opaque)
+static void property_release_data(Object *obj, const char *name,
+ void *opaque)
{
- StringProperty *prop = opaque;
- g_free(prop);
+ g_free(opaque);
}
ObjectProperty *
@@ -2195,7 +2194,7 @@ object_property_add_str(Object *obj, const char *name,
return object_property_add(obj, name, "string",
get ? property_get_str : NULL,
set ? property_set_str : NULL,
- property_release_str,
+ property_release_data,
prop);
}
@@ -2252,13 +2251,6 @@ static void property_set_bool(Object *obj, Visitor *v, const char *name,
prop->set(obj, value, errp);
}
-static void property_release_bool(Object *obj, const char *name,
- void *opaque)
-{
- BoolProperty *prop = opaque;
- g_free(prop);
-}
-
ObjectProperty *
object_property_add_bool(Object *obj, const char *name,
bool (*get)(Object *, Error **),
@@ -2272,7 +2264,7 @@ object_property_add_bool(Object *obj, const char *name,
return object_property_add(obj, name, "bool",
get ? property_get_bool : NULL,
set ? property_set_bool : NULL,
- property_release_bool,
+ property_release_data,
prop);
}
@@ -2321,13 +2313,6 @@ static void property_set_enum(Object *obj, Visitor *v, const char *name,
prop->set(obj, value, errp);
}
-static void property_release_enum(Object *obj, const char *name,
- void *opaque)
-{
- EnumProperty *prop = opaque;
- g_free(prop);
-}
-
ObjectProperty *
object_property_add_enum(Object *obj, const char *name,
const char *typename,
@@ -2344,7 +2329,7 @@ object_property_add_enum(Object *obj, const char *name,
return object_property_add(obj, name, typename,
get ? property_get_enum : NULL,
set ? property_set_enum : NULL,
- property_release_enum,
+ property_release_data,
prop);
}
@@ -2411,13 +2396,6 @@ out_end:
visit_end_struct(v, NULL);
}
-static void property_release_tm(Object *obj, const char *name,
- void *opaque)
-{
- TMProperty *prop = opaque;
- g_free(prop);
-}
-
ObjectProperty *
object_property_add_tm(Object *obj, const char *name,
void (*get)(Object *, struct tm *, Error **))
@@ -2428,7 +2406,7 @@ object_property_add_tm(Object *obj, const char *name,
return object_property_add(obj, name, "struct tm",
get ? property_get_tm : NULL, NULL,
- property_release_tm,
+ property_release_data,
prop);
}