* [PATCH v2 0/3] qom: Few trivial patches
@ 2020-05-04 11:56 Philippe Mathieu-Daudé
2020-05-04 11:56 ` [PATCH v2 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h' Philippe Mathieu-Daudé
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04 11:56 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé,
Eduardo Habkost, qemu-trivial, Michael Tokarev, Laurent Vivier,
Markus Armbruster, Paolo Bonzini, Philippe Mathieu-Daudé
Some QOM patches worth salvaging while doing housekeeping.
Since v1:
- Fixed test build failure (patchew)
Philippe Mathieu-Daudé (3):
qom/object: Move Object typedef to 'qemu/typedefs.h'
io/task: Move 'qom/object.h' header to source
qom/object: Make reparenting error more verbose
include/io/task.h | 2 --
include/qemu/typedefs.h | 1 +
include/qom/object.h | 2 --
include/qom/qom-qobject.h | 2 --
include/sysemu/sysemu.h | 1 -
io/task.c | 1 +
qom/object.c | 7 ++++++-
tests/test-io-task.c | 1 +
8 files changed, 9 insertions(+), 8 deletions(-)
--
2.21.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h'
2020-05-04 11:56 [PATCH v2 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
@ 2020-05-04 11:56 ` Philippe Mathieu-Daudé
2020-05-15 6:07 ` Markus Armbruster
2020-05-04 11:56 ` [PATCH v2 2/3] io/task: Move 'qom/object.h' header to source Philippe Mathieu-Daudé
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04 11:56 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé,
Eduardo Habkost, qemu-trivial, Michael Tokarev, Laurent Vivier,
Markus Armbruster, Paolo Bonzini, Philippe Mathieu-Daudé
We use the Object type all over the place.
Forward declare it in "qemu/typedefs.h".
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/qemu/typedefs.h | 1 +
include/qom/object.h | 2 --
include/qom/qom-qobject.h | 2 --
include/sysemu/sysemu.h | 1 -
4 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index 375770a80f..b03ec9f40a 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -75,6 +75,7 @@ typedef struct NetFilterState NetFilterState;
typedef struct NICInfo NICInfo;
typedef struct NodeInfo NodeInfo;
typedef struct NumaNodeMem NumaNodeMem;
+typedef struct Object Object;
typedef struct ObjectClass ObjectClass;
typedef struct PCIBridge PCIBridge;
typedef struct PCIBus PCIBus;
diff --git a/include/qom/object.h b/include/qom/object.h
index 784c97c0e1..1edc12e64c 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -20,8 +20,6 @@
struct TypeImpl;
typedef struct TypeImpl *Type;
-typedef struct Object Object;
-
typedef struct TypeInfo TypeInfo;
typedef struct InterfaceClass InterfaceClass;
diff --git a/include/qom/qom-qobject.h b/include/qom/qom-qobject.h
index 77cd717e3f..82136e6e80 100644
--- a/include/qom/qom-qobject.h
+++ b/include/qom/qom-qobject.h
@@ -13,8 +13,6 @@
#ifndef QEMU_QOM_QOBJECT_H
#define QEMU_QOM_QOBJECT_H
-#include "qom/object.h"
-
/*
* object_property_get_qobject:
* @obj: the object
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index ef81302e1a..ca4458e451 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -5,7 +5,6 @@
#include "qemu/timer.h"
#include "qemu/notify.h"
#include "qemu/uuid.h"
-#include "qom/object.h"
/* vl.c */
--
2.21.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/3] io/task: Move 'qom/object.h' header to source
2020-05-04 11:56 [PATCH v2 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
2020-05-04 11:56 ` [PATCH v2 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h' Philippe Mathieu-Daudé
@ 2020-05-04 11:56 ` Philippe Mathieu-Daudé
2020-05-04 11:56 ` [PATCH v2 3/3] qom/object: Make reparenting error more verbose Philippe Mathieu-Daudé
2020-05-12 7:02 ` [PATCH v2 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
3 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04 11:56 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé,
Eduardo Habkost, qemu-trivial, Michael Tokarev, Laurent Vivier,
Markus Armbruster, Paolo Bonzini, Philippe Mathieu-Daudé
We need "qom/object.h" to call object_ref()/object_unref(),
and to test the TYPE_DUMMY.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
v2: Add missing header in tests/test-io-task.c (patchew)
---
include/io/task.h | 2 --
io/task.c | 1 +
tests/test-io-task.c | 1 +
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/io/task.h b/include/io/task.h
index 1abbfb8b65..6818dfedd0 100644
--- a/include/io/task.h
+++ b/include/io/task.h
@@ -21,8 +21,6 @@
#ifndef QIO_TASK_H
#define QIO_TASK_H
-#include "qom/object.h"
-
typedef struct QIOTask QIOTask;
typedef void (*QIOTaskFunc)(QIOTask *task,
diff --git a/io/task.c b/io/task.c
index 1ae7b86488..53c0bed686 100644
--- a/io/task.c
+++ b/io/task.c
@@ -22,6 +22,7 @@
#include "io/task.h"
#include "qapi/error.h"
#include "qemu/thread.h"
+#include "qom/object.h"
#include "trace.h"
struct QIOTaskThreadData {
diff --git a/tests/test-io-task.c b/tests/test-io-task.c
index aa8b653bfa..c8a3813d49 100644
--- a/tests/test-io-task.c
+++ b/tests/test-io-task.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
+#include "qom/object.h"
#include "io/task.h"
#include "qapi/error.h"
#include "qemu/module.h"
--
2.21.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/3] qom/object: Make reparenting error more verbose
2020-05-04 11:56 [PATCH v2 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
2020-05-04 11:56 ` [PATCH v2 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h' Philippe Mathieu-Daudé
2020-05-04 11:56 ` [PATCH v2 2/3] io/task: Move 'qom/object.h' header to source Philippe Mathieu-Daudé
@ 2020-05-04 11:56 ` Philippe Mathieu-Daudé
2020-05-12 7:02 ` [PATCH v2 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
3 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-04 11:56 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé,
Eduardo Habkost, qemu-trivial, Michael Tokarev, Laurent Vivier,
Markus Armbruster, Paolo Bonzini, Philippe Mathieu-Daudé
Display child and parent names when reparenting occurs.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
qom/object.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/qom/object.c b/qom/object.c
index be700e831f..417fd90aa5 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1683,7 +1683,12 @@ void object_property_add_child(Object *obj, const char *name,
ObjectProperty *op;
if (child->parent != NULL) {
- error_setg(errp, "child object is already parented");
+ error_setg(errp, "child object '%s' is already parented (parent: '%s') "
+ "can not be children '%s' of '%s'",
+ object_get_typename(child),
+ object_get_typename(child->parent),
+ name,
+ object_get_typename(obj));
return;
}
--
2.21.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 0/3] qom: Few trivial patches
2020-05-04 11:56 [PATCH v2 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2020-05-04 11:56 ` [PATCH v2 3/3] qom/object: Make reparenting error more verbose Philippe Mathieu-Daudé
@ 2020-05-12 7:02 ` Philippe Mathieu-Daudé
3 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-12 7:02 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé,
Eduardo Habkost, qemu-trivial, Michael Tokarev,
Markus Armbruster, Laurent Vivier, Paolo Bonzini
ping?
On 5/4/20 1:56 PM, Philippe Mathieu-Daudé wrote:
> Some QOM patches worth salvaging while doing housekeeping.
>
> Since v1:
> - Fixed test build failure (patchew)
>
> Philippe Mathieu-Daudé (3):
> qom/object: Move Object typedef to 'qemu/typedefs.h'
> io/task: Move 'qom/object.h' header to source
> qom/object: Make reparenting error more verbose
>
> include/io/task.h | 2 --
> include/qemu/typedefs.h | 1 +
> include/qom/object.h | 2 --
> include/qom/qom-qobject.h | 2 --
> include/sysemu/sysemu.h | 1 -
> io/task.c | 1 +
> qom/object.c | 7 ++++++-
> tests/test-io-task.c | 1 +
> 8 files changed, 9 insertions(+), 8 deletions(-)
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h'
2020-05-04 11:56 ` [PATCH v2 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h' Philippe Mathieu-Daudé
@ 2020-05-15 6:07 ` Markus Armbruster
2020-05-15 7:00 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 9+ messages in thread
From: Markus Armbruster @ 2020-05-15 6:07 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Daniel P. Berrangé,
Eduardo Habkost, qemu-trivial, Michael Tokarev, Laurent Vivier,
qemu-devel, Paolo Bonzini
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> We use the Object type all over the place.
> Forward declare it in "qemu/typedefs.h".
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> include/qemu/typedefs.h | 1 +
> include/qom/object.h | 2 --
> include/qom/qom-qobject.h | 2 --
> include/sysemu/sysemu.h | 1 -
> 4 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
> index 375770a80f..b03ec9f40a 100644
> --- a/include/qemu/typedefs.h
> +++ b/include/qemu/typedefs.h
> @@ -75,6 +75,7 @@ typedef struct NetFilterState NetFilterState;
> typedef struct NICInfo NICInfo;
> typedef struct NodeInfo NodeInfo;
> typedef struct NumaNodeMem NumaNodeMem;
> +typedef struct Object Object;
> typedef struct ObjectClass ObjectClass;
> typedef struct PCIBridge PCIBridge;
> typedef struct PCIBus PCIBus;
> diff --git a/include/qom/object.h b/include/qom/object.h
> index 784c97c0e1..1edc12e64c 100644
> --- a/include/qom/object.h
> +++ b/include/qom/object.h
> @@ -20,8 +20,6 @@
> struct TypeImpl;
> typedef struct TypeImpl *Type;
>
> -typedef struct Object Object;
> -
> typedef struct TypeInfo TypeInfo;
>
> typedef struct InterfaceClass InterfaceClass;
> diff --git a/include/qom/qom-qobject.h b/include/qom/qom-qobject.h
> index 77cd717e3f..82136e6e80 100644
> --- a/include/qom/qom-qobject.h
> +++ b/include/qom/qom-qobject.h
> @@ -13,8 +13,6 @@
> #ifndef QEMU_QOM_QOBJECT_H
> #define QEMU_QOM_QOBJECT_H
>
> -#include "qom/object.h"
> -
> /*
> * object_property_get_qobject:
> * @obj: the object
> diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
> index ef81302e1a..ca4458e451 100644
> --- a/include/sysemu/sysemu.h
> +++ b/include/sysemu/sysemu.h
> @@ -5,7 +5,6 @@
> #include "qemu/timer.h"
> #include "qemu/notify.h"
> #include "qemu/uuid.h"
> -#include "qom/object.h"
>
> /* vl.c */
How did you identify the inclusions to drop?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h'
2020-05-15 6:07 ` Markus Armbruster
@ 2020-05-15 7:00 ` Philippe Mathieu-Daudé
2020-05-18 4:52 ` Markus Armbruster
2020-05-21 14:13 ` Paolo Bonzini
0 siblings, 2 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-15 7:00 UTC (permalink / raw)
To: Markus Armbruster
Cc: Daniel P. Berrangé,
Eduardo Habkost, QEMU Trivial, Michael Tokarev,
qemu-devel@nongnu.org Developers, Laurent Vivier, Paolo Bonzini
On Fri, May 15, 2020 at 8:07 AM Markus Armbruster <armbru@redhat.com> wrote:
>
> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
>
> > We use the Object type all over the place.
> > Forward declare it in "qemu/typedefs.h".
> >
> > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> > ---
> > include/qemu/typedefs.h | 1 +
> > include/qom/object.h | 2 --
> > include/qom/qom-qobject.h | 2 --
> > include/sysemu/sysemu.h | 1 -
> > 4 files changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
> > index 375770a80f..b03ec9f40a 100644
> > --- a/include/qemu/typedefs.h
> > +++ b/include/qemu/typedefs.h
> > @@ -75,6 +75,7 @@ typedef struct NetFilterState NetFilterState;
> > typedef struct NICInfo NICInfo;
> > typedef struct NodeInfo NodeInfo;
> > typedef struct NumaNodeMem NumaNodeMem;
> > +typedef struct Object Object;
> > typedef struct ObjectClass ObjectClass;
> > typedef struct PCIBridge PCIBridge;
> > typedef struct PCIBus PCIBus;
> > diff --git a/include/qom/object.h b/include/qom/object.h
> > index 784c97c0e1..1edc12e64c 100644
> > --- a/include/qom/object.h
> > +++ b/include/qom/object.h
> > @@ -20,8 +20,6 @@
> > struct TypeImpl;
> > typedef struct TypeImpl *Type;
> >
> > -typedef struct Object Object;
> > -
> > typedef struct TypeInfo TypeInfo;
> >
> > typedef struct InterfaceClass InterfaceClass;
> > diff --git a/include/qom/qom-qobject.h b/include/qom/qom-qobject.h
> > index 77cd717e3f..82136e6e80 100644
> > --- a/include/qom/qom-qobject.h
> > +++ b/include/qom/qom-qobject.h
> > @@ -13,8 +13,6 @@
> > #ifndef QEMU_QOM_QOBJECT_H
> > #define QEMU_QOM_QOBJECT_H
> >
> > -#include "qom/object.h"
> > -
> > /*
> > * object_property_get_qobject:
> > * @obj: the object
> > diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
> > index ef81302e1a..ca4458e451 100644
> > --- a/include/sysemu/sysemu.h
> > +++ b/include/sysemu/sysemu.h
> > @@ -5,7 +5,6 @@
> > #include "qemu/timer.h"
> > #include "qemu/notify.h"
> > #include "qemu/uuid.h"
> > -#include "qom/object.h"
> >
> > /* vl.c */
>
> How did you identify the inclusions to drop?
Nothing very strict I'm afraid. I suppose I had the files opened in my editor.
The output of
$ git grep -L -E '(OBJECT_|INTERFACE_)' $(git grep -l qom/object include)
suggests I missed those:
-- >8 --
diff --git a/include/hw/display/edid.h b/include/hw/display/edid.h
index ff99dc0a05..5b1de57f24 100644
--- a/include/hw/display/edid.h
+++ b/include/hw/display/edid.h
@@ -1,8 +1,6 @@
#ifndef EDID_H
#define EDID_H
-#include "qom/object.h"
-
typedef struct qemu_edid_info {
const char *vendor; /* http://www.uefi.org/pnp_id_list */
const char *name;
diff --git a/include/io/task.h b/include/io/task.h
index 1abbfb8b65..6818dfedd0 100644
--- a/include/io/task.h
+++ b/include/io/task.h
@@ -21,8 +21,6 @@
#ifndef QIO_TASK_H
#define QIO_TASK_H
-#include "qom/object.h"
-
typedef struct QIOTask QIOTask;
typedef void (*QIOTaskFunc)(QIOTask *task,
---
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h'
2020-05-15 7:00 ` Philippe Mathieu-Daudé
@ 2020-05-18 4:52 ` Markus Armbruster
2020-05-21 14:13 ` Paolo Bonzini
1 sibling, 0 replies; 9+ messages in thread
From: Markus Armbruster @ 2020-05-18 4:52 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Daniel P. Berrangé,
Eduardo Habkost, QEMU Trivial, Michael Tokarev, Laurent Vivier,
qemu-devel@nongnu.org Developers, Paolo Bonzini
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> On Fri, May 15, 2020 at 8:07 AM Markus Armbruster <armbru@redhat.com> wrote:
>>
>> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
>>
>> > We use the Object type all over the place.
>> > Forward declare it in "qemu/typedefs.h".
>> >
>> > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> > ---
>> > include/qemu/typedefs.h | 1 +
>> > include/qom/object.h | 2 --
>> > include/qom/qom-qobject.h | 2 --
>> > include/sysemu/sysemu.h | 1 -
>> > 4 files changed, 1 insertion(+), 5 deletions(-)
>> >
>> > diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
>> > index 375770a80f..b03ec9f40a 100644
>> > --- a/include/qemu/typedefs.h
>> > +++ b/include/qemu/typedefs.h
>> > @@ -75,6 +75,7 @@ typedef struct NetFilterState NetFilterState;
>> > typedef struct NICInfo NICInfo;
>> > typedef struct NodeInfo NodeInfo;
>> > typedef struct NumaNodeMem NumaNodeMem;
>> > +typedef struct Object Object;
>> > typedef struct ObjectClass ObjectClass;
>> > typedef struct PCIBridge PCIBridge;
>> > typedef struct PCIBus PCIBus;
>> > diff --git a/include/qom/object.h b/include/qom/object.h
>> > index 784c97c0e1..1edc12e64c 100644
>> > --- a/include/qom/object.h
>> > +++ b/include/qom/object.h
>> > @@ -20,8 +20,6 @@
>> > struct TypeImpl;
>> > typedef struct TypeImpl *Type;
>> >
>> > -typedef struct Object Object;
>> > -
>> > typedef struct TypeInfo TypeInfo;
>> >
>> > typedef struct InterfaceClass InterfaceClass;
>> > diff --git a/include/qom/qom-qobject.h b/include/qom/qom-qobject.h
>> > index 77cd717e3f..82136e6e80 100644
>> > --- a/include/qom/qom-qobject.h
>> > +++ b/include/qom/qom-qobject.h
>> > @@ -13,8 +13,6 @@
>> > #ifndef QEMU_QOM_QOBJECT_H
>> > #define QEMU_QOM_QOBJECT_H
>> >
>> > -#include "qom/object.h"
>> > -
>> > /*
>> > * object_property_get_qobject:
>> > * @obj: the object
>> > diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
>> > index ef81302e1a..ca4458e451 100644
>> > --- a/include/sysemu/sysemu.h
>> > +++ b/include/sysemu/sysemu.h
>> > @@ -5,7 +5,6 @@
>> > #include "qemu/timer.h"
>> > #include "qemu/notify.h"
>> > #include "qemu/uuid.h"
>> > -#include "qom/object.h"
>> >
>> > /* vl.c */
>>
>> How did you identify the inclusions to drop?
>
> Nothing very strict I'm afraid. I suppose I had the files opened in my editor.
>
> The output of
> $ git grep -L -E '(OBJECT_|INTERFACE_)' $(git grep -l qom/object include)
Why limit to include, and not check '*.h', or even '*.[ch]'?
> suggests I missed those:
>
> -- >8 --
> diff --git a/include/hw/display/edid.h b/include/hw/display/edid.h
> index ff99dc0a05..5b1de57f24 100644
> --- a/include/hw/display/edid.h
> +++ b/include/hw/display/edid.h
> @@ -1,8 +1,6 @@
> #ifndef EDID_H
> #define EDID_H
>
> -#include "qom/object.h"
> -
> typedef struct qemu_edid_info {
> const char *vendor; /* http://www.uefi.org/pnp_id_list */
> const char *name;
> diff --git a/include/io/task.h b/include/io/task.h
> index 1abbfb8b65..6818dfedd0 100644
> --- a/include/io/task.h
> +++ b/include/io/task.h
> @@ -21,8 +21,6 @@
> #ifndef QIO_TASK_H
> #define QIO_TASK_H
>
> -#include "qom/object.h"
> -
> typedef struct QIOTask QIOTask;
>
> typedef void (*QIOTaskFunc)(QIOTask *task,
> ---
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h'
2020-05-15 7:00 ` Philippe Mathieu-Daudé
2020-05-18 4:52 ` Markus Armbruster
@ 2020-05-21 14:13 ` Paolo Bonzini
1 sibling, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2020-05-21 14:13 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Markus Armbruster
Cc: Daniel P. Berrangé,
Eduardo Habkost, QEMU Trivial, Michael Tokarev,
qemu-devel@nongnu.org Developers, Laurent Vivier
On 15/05/20 09:00, Philippe Mathieu-Daudé wrote:
> On Fri, May 15, 2020 at 8:07 AM Markus Armbruster <armbru@redhat.com> wrote:
>>
>> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
>>
>>> We use the Object type all over the place.
>>> Forward declare it in "qemu/typedefs.h".
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>> ---
>>> include/qemu/typedefs.h | 1 +
>>> include/qom/object.h | 2 --
>>> include/qom/qom-qobject.h | 2 --
>>> include/sysemu/sysemu.h | 1 -
>>> 4 files changed, 1 insertion(+), 5 deletions(-)
>>>
>>> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
>>> index 375770a80f..b03ec9f40a 100644
>>> --- a/include/qemu/typedefs.h
>>> +++ b/include/qemu/typedefs.h
>>> @@ -75,6 +75,7 @@ typedef struct NetFilterState NetFilterState;
>>> typedef struct NICInfo NICInfo;
>>> typedef struct NodeInfo NodeInfo;
>>> typedef struct NumaNodeMem NumaNodeMem;
>>> +typedef struct Object Object;
>>> typedef struct ObjectClass ObjectClass;
>>> typedef struct PCIBridge PCIBridge;
>>> typedef struct PCIBus PCIBus;
>>> diff --git a/include/qom/object.h b/include/qom/object.h
>>> index 784c97c0e1..1edc12e64c 100644
>>> --- a/include/qom/object.h
>>> +++ b/include/qom/object.h
>>> @@ -20,8 +20,6 @@
>>> struct TypeImpl;
>>> typedef struct TypeImpl *Type;
>>>
>>> -typedef struct Object Object;
>>> -
>>> typedef struct TypeInfo TypeInfo;
>>>
>>> typedef struct InterfaceClass InterfaceClass;
>>> diff --git a/include/qom/qom-qobject.h b/include/qom/qom-qobject.h
>>> index 77cd717e3f..82136e6e80 100644
>>> --- a/include/qom/qom-qobject.h
>>> +++ b/include/qom/qom-qobject.h
>>> @@ -13,8 +13,6 @@
>>> #ifndef QEMU_QOM_QOBJECT_H
>>> #define QEMU_QOM_QOBJECT_H
>>>
>>> -#include "qom/object.h"
>>> -
>>> /*
>>> * object_property_get_qobject:
>>> * @obj: the object
>>> diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
>>> index ef81302e1a..ca4458e451 100644
>>> --- a/include/sysemu/sysemu.h
>>> +++ b/include/sysemu/sysemu.h
>>> @@ -5,7 +5,6 @@
>>> #include "qemu/timer.h"
>>> #include "qemu/notify.h"
>>> #include "qemu/uuid.h"
>>> -#include "qom/object.h"
>>>
>>> /* vl.c */
>>
>> How did you identify the inclusions to drop?
>
> Nothing very strict I'm afraid. I suppose I had the files opened in my editor.
Looks like all of these are affected:
accel/accel.c | 1 -
block/throttle-groups.c | 1 -
hw/audio/soundhw.c | 1 -
hw/block/vhost-user-blk.c | 1 -
hw/pci-host/pam.c | 1 -
hw/ppc/spapr_drc.c | 1 -
hw/scsi/vhost-user-scsi.c | 1 -
include/hw/display/edid.h | 1 -
include/hw/misc/pvpanic.h | 1 -
include/hw/timer/hpet.h | 1 -
io/task.c | 1 -
memory.c | 1 -
stubs/qmp_memory_device.c | 1 -
target/arm/kvm.c | 1 -
tests/test-io-task.c | 1 -
Patch 3 doesn't apply anymore, I queued the first two.
Paolo
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-05-21 14:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04 11:56 [PATCH v2 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
2020-05-04 11:56 ` [PATCH v2 1/3] qom/object: Move Object typedef to 'qemu/typedefs.h' Philippe Mathieu-Daudé
2020-05-15 6:07 ` Markus Armbruster
2020-05-15 7:00 ` Philippe Mathieu-Daudé
2020-05-18 4:52 ` Markus Armbruster
2020-05-21 14:13 ` Paolo Bonzini
2020-05-04 11:56 ` [PATCH v2 2/3] io/task: Move 'qom/object.h' header to source Philippe Mathieu-Daudé
2020-05-04 11:56 ` [PATCH v2 3/3] qom/object: Make reparenting error more verbose Philippe Mathieu-Daudé
2020-05-12 7:02 ` [PATCH v2 0/3] qom: Few trivial patches Philippe Mathieu-Daudé
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.