[PATCH 1/5] qom: remove unused function

Paolo Bonzini posted 5 patches 3 weeks, 4 days ago
[PATCH 1/5] qom: remove unused function
Posted by Paolo Bonzini 3 weeks, 4 days ago
The function has been unused since commit 4fa28f23906 ("ppc/pnv:
Instantiate cores separately", 2019-12-17).  The idea was that
you could use it to build an array of objects via pointer
arithmetic, but no one is doing it anymore.

Cc: Dr. David Alan Gilbert <dave@treblig.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 include/qom/object.h | 8 --------
 qom/object.c         | 8 --------
 2 files changed, 16 deletions(-)

diff --git a/include/qom/object.h b/include/qom/object.h
index 2af9854675c..43c135984a6 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -2032,14 +2032,6 @@ int object_child_foreach_recursive(Object *obj,
  */
 Object *container_get(Object *root, const char *path);
 
-/**
- * object_type_get_instance_size:
- * @typename: Name of the Type whose instance_size is required
- *
- * Returns the instance_size of the given @typename.
- */
-size_t object_type_get_instance_size(const char *typename);
-
 /**
  * object_property_help:
  * @name: the name of the property
diff --git a/qom/object.c b/qom/object.c
index 11424cf4711..8b269414488 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -262,14 +262,6 @@ static size_t type_object_get_align(TypeImpl *ti)
     return 0;
 }
 
-size_t object_type_get_instance_size(const char *typename)
-{
-    TypeImpl *type = type_get_by_name(typename);
-
-    g_assert(type != NULL);
-    return type_object_get_size(type);
-}
-
 static bool type_is_ancestor(TypeImpl *type, TypeImpl *target_type)
 {
     assert(target_type);
-- 
2.47.0
Re: [PATCH 1/5] qom: remove unused function
Posted by Daniel P. Berrangé 3 weeks, 4 days ago
On Tue, Oct 29, 2024 at 01:26:05PM +0100, Paolo Bonzini wrote:
> The function has been unused since commit 4fa28f23906 ("ppc/pnv:
> Instantiate cores separately", 2019-12-17).  The idea was that
> you could use it to build an array of objects via pointer
> arithmetic, but no one is doing it anymore.
> 
> Cc: Dr. David Alan Gilbert <dave@treblig.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  include/qom/object.h | 8 --------
>  qom/object.c         | 8 --------
>  2 files changed, 16 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|