[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 043/115] qom/object: pass (Object *) to object_initialize_with_typ
From: |
Paolo Bonzini |
Subject: |
[PULL 043/115] qom/object: pass (Object *) to object_initialize_with_type() |
Date: |
Thu, 11 Jun 2020 15:43:37 -0400 |
From: Masahiro Yamada <masahiroy@kernel.org>
object_new_with_type() already passes (Object *) pointer.
Avoid casting back and forth.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Message-Id: <20200512173104.2293073-1-masahiroy@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
qom/object.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/qom/object.c b/qom/object.c
index bc39ad4b99..b0ed560fd8 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -494,10 +494,8 @@ static void object_class_property_init_all(Object *obj)
}
}
-static void object_initialize_with_type(void *data, size_t size, TypeImpl
*type)
+static void object_initialize_with_type(Object *obj, size_t size, TypeImpl
*type)
{
- Object *obj = data;
-
type_initialize(type);
g_assert(type->instance_size >= sizeof(Object));
--
2.26.2
- [PULL 036/115] i386/cpu: Store LAPIC bus frequency in CPU structure, (continued)
- [PULL 036/115] i386/cpu: Store LAPIC bus frequency in CPU structure, Paolo Bonzini, 2020/06/11
- [PULL 039/115] accel: Move Xen accelerator code under accel/xen/, Paolo Bonzini, 2020/06/11
- [PULL 026/115] hw/i386/vmport: Add device properties, Paolo Bonzini, 2020/06/11
- [PULL 051/115] target/i386: implement special cases for fxtract, Paolo Bonzini, 2020/06/11
- [PULL 056/115] exec: Let address_space_read/write_cached() propagate MemTxResult, Paolo Bonzini, 2020/06/11
- [PULL 038/115] hw/i386/vmport: Assert vmport initialized before registering commands, Paolo Bonzini, 2020/06/11
- [PULL 042/115] qom/object: simplify type_initialize_interface(), Paolo Bonzini, 2020/06/11
- [PULL 046/115] hax: Dynamic allocate vcpu state structure, Paolo Bonzini, 2020/06/11
- [PULL 053/115] target/i386: fix fscale handling of invalid exponent encodings, Paolo Bonzini, 2020/06/11
- [PULL 052/115] target/i386: fix fscale handling of signaling NaN, Paolo Bonzini, 2020/06/11
- [PULL 043/115] qom/object: pass (Object *) to object_initialize_with_type(),
Paolo Bonzini <=
- [PULL 034/115] hw/i386/vmport: Add support for CMD_GET_VCPU_INFO, Paolo Bonzini, 2020/06/11
- [PULL 049/115] megasas: avoid NULL pointer dereference, Paolo Bonzini, 2020/06/11
- [PULL 061/115] target/i386: fix fxam handling of invalid encodings, Paolo Bonzini, 2020/06/11
- [PULL 062/115] target/i386: fix fbstp handling of negative zero, Paolo Bonzini, 2020/06/11
- [PULL 065/115] hw/i386/vmport: Allow QTest use without crashing, Paolo Bonzini, 2020/06/11
- [PULL 063/115] target/i386: fix fbstp handling of out-of-range values, Paolo Bonzini, 2020/06/11
- [PULL 054/115] target/i386: fix fscale handling of infinite exponents, Paolo Bonzini, 2020/06/11
- [PULL 044/115] qom/container: remove .instance_size initializer from container_info, Paolo Bonzini, 2020/06/11
- [PULL 037/115] hw/i386/vmport: Add support for CMD_GETHZ, Paolo Bonzini, 2020/06/11
- [PULL 045/115] cpus: Fix botched configure_icount() error API violation fix, Paolo Bonzini, 2020/06/11