diff mbox series

[2/3] io/task: Move 'qom/object.h' header to source

Message ID 20200504084615.27642-3-f4bug@amsat.org
State New
Headers show
Series qom: Few trivial patches | expand

Commit Message

Philippe Mathieu-Daudé May 4, 2020, 8:46 a.m. UTC
We need "qom/object.h" to call object_ref()/object_unref().

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/io/task.h | 2 --
 io/task.c         | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Richard Henderson May 4, 2020, 5:42 p.m. UTC | #1
On 5/4/20 1:46 AM, Philippe Mathieu-Daudé wrote:
> We need "qom/object.h" to call object_ref()/object_unref().

This description doesn't seem to match

> +++ 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"

the change.  Since io/task.c includes io/tash.h, what are you actually doing?


r~
Philippe Mathieu-Daudé May 4, 2020, 7:43 p.m. UTC | #2
On 5/4/20 7:42 PM, Richard Henderson wrote:
> On 5/4/20 1:46 AM, Philippe Mathieu-Daudé wrote:
>> We need "qom/object.h" to call object_ref()/object_unref().
> 
> This description doesn't seem to match
> 
>> +++ 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"
> 
> the change.  Since io/task.c includes io/tash.h, what are you actually doing?

Sorry to not document clearly on the cover.

The original goal was to stop using $SRC_PATH as include directory, but 
as it is huge I believe it will never get fully accepted, so I simply 
kept the few maybe worthwhile patches...

The final patch is:

-- >8 --
--- a/configure
+++ b/configure
@@ -601,7 +601,7 @@ QEMU_CFLAGS="-fno-strict-aliasing -fno-common 
-fwrapv -std=gnu99 $QEMU_CFLAGS"
  QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes 
$QEMU_CFLAGS"
  QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
  QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
$QEMU_CFLAGS"
-QEMU_INCLUDES="-iquote . -iquote \$(SRC_PATH) -iquote 
\$(SRC_PATH)/accel/tcg -iquote \$(SRC_PATH)/include"
+QEMU_INCLUDES="-iquote . -iquote \$(SRC_PATH)/accel/tcg -iquote 
\$(SRC_PATH)/include"
  QEMU_INCLUDES="$QEMU_INCLUDES -iquote \$(SRC_PATH)/disas/libvixl"
  if test "$debug_info" = "yes"; then
      CFLAGS="-g $CFLAGS"
---
diff mbox series

Patch

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 {