All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qom/container: remove .instance_size initializer from container_info
@ 2020-05-13  3:36 Masahiro Yamada
  2020-05-21 14:46 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2020-05-13  3:36 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini, Daniel P . Berrange, Eduardo Habkost
  Cc: Masahiro Yamada

You can omit .instance_size if it is the same as that of the parent.

    .class_size = sizeof(ObjectClass)

... is omitted here, so removing .instance_size is more consistent.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 qom/container.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/qom/container.c b/qom/container.c
index f6ccaf7ea7..4c030d6dda 100644
--- a/qom/container.c
+++ b/qom/container.c
@@ -16,7 +16,6 @@
 
 static const TypeInfo container_info = {
     .name          = "container",
-    .instance_size = sizeof(Object),
     .parent        = TYPE_OBJECT,
 };
 
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] qom/container: remove .instance_size initializer from container_info
  2020-05-13  3:36 [PATCH] qom/container: remove .instance_size initializer from container_info Masahiro Yamada
@ 2020-05-21 14:46 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2020-05-21 14:46 UTC (permalink / raw)
  To: Masahiro Yamada, qemu-devel, Daniel P . Berrange, Eduardo Habkost

On 13/05/20 05:36, Masahiro Yamada wrote:
> You can omit .instance_size if it is the same as that of the parent.
> 
>     .class_size = sizeof(ObjectClass)
> 
> ... is omitted here, so removing .instance_size is more consistent.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  qom/container.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/qom/container.c b/qom/container.c
> index f6ccaf7ea7..4c030d6dda 100644
> --- a/qom/container.c
> +++ b/qom/container.c
> @@ -16,7 +16,6 @@
>  
>  static const TypeInfo container_info = {
>      .name          = "container",
> -    .instance_size = sizeof(Object),
>      .parent        = TYPE_OBJECT,
>  };
>  
> 

Queued, thanks.

Paolo



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-21 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13  3:36 [PATCH] qom/container: remove .instance_size initializer from container_info Masahiro Yamada
2020-05-21 14:46 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.