qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] includes: Remove unnecessary 'qemu/typedefs.h' include
@ 2025-07-08  8:58 Philippe Mathieu-Daudé
  2025-07-08  8:58 ` [PATCH v2 1/3] hw/intc/loongarch_extioi: " Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-07-08  8:58 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jiaxun Yang, Cédric Le Goater, Stefan Weil, Song Gao,
	Bibo Mao, Alex Williamson, Philippe Mathieu-Daudé

v2: Split as 1 patch per MAINTAINERS section.

Philippe Mathieu-Daudé (3):
  hw/intc/loongarch_extioi: Remove unnecessary 'qemu/typedefs.h' include
  hw/vfio/vfio-migration: Remove unnecessary 'qemu/typedefs.h' include
  system/os-win32: Remove unnecessary 'qemu/typedefs.h' include

 hw/vfio/vfio-migration-internal.h | 1 -
 include/system/os-win32.h         | 1 -
 hw/intc/loongarch_extioi_kvm.c    | 1 -
 3 files changed, 3 deletions(-)

-- 
2.49.0



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

* [PATCH v2 1/3] hw/intc/loongarch_extioi: Remove unnecessary 'qemu/typedefs.h' include
  2025-07-08  8:58 [PATCH v2 0/3] includes: Remove unnecessary 'qemu/typedefs.h' include Philippe Mathieu-Daudé
@ 2025-07-08  8:58 ` Philippe Mathieu-Daudé
  2025-07-08  8:58 ` [PATCH v2 2/3] hw/vfio/vfio-migration: " Philippe Mathieu-Daudé
  2025-07-08  8:58 ` [PATCH v2 3/3] system/os-win32: " Philippe Mathieu-Daudé
  2 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-07-08  8:58 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jiaxun Yang, Cédric Le Goater, Stefan Weil, Song Gao,
	Bibo Mao, Alex Williamson, Philippe Mathieu-Daudé

"qemu/typedefs.h" is already included by "qemu/osdep.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/intc/loongarch_extioi_kvm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/intc/loongarch_extioi_kvm.c b/hw/intc/loongarch_extioi_kvm.c
index 0133540c45d..aa2e8c753fb 100644
--- a/hw/intc/loongarch_extioi_kvm.c
+++ b/hw/intc/loongarch_extioi_kvm.c
@@ -6,7 +6,6 @@
  */
 
 #include "qemu/osdep.h"
-#include "qemu/typedefs.h"
 #include "hw/intc/loongarch_extioi.h"
 #include "linux/kvm.h"
 #include "qapi/error.h"
-- 
2.49.0



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

* [PATCH v2 2/3] hw/vfio/vfio-migration: Remove unnecessary 'qemu/typedefs.h' include
  2025-07-08  8:58 [PATCH v2 0/3] includes: Remove unnecessary 'qemu/typedefs.h' include Philippe Mathieu-Daudé
  2025-07-08  8:58 ` [PATCH v2 1/3] hw/intc/loongarch_extioi: " Philippe Mathieu-Daudé
@ 2025-07-08  8:58 ` Philippe Mathieu-Daudé
  2025-07-15  5:39   ` Cédric Le Goater
  2025-07-08  8:58 ` [PATCH v2 3/3] system/os-win32: " Philippe Mathieu-Daudé
  2 siblings, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-07-08  8:58 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jiaxun Yang, Cédric Le Goater, Stefan Weil, Song Gao,
	Bibo Mao, Alex Williamson, Philippe Mathieu-Daudé

"qemu/typedefs.h" is already included by "qemu/osdep.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/vfio/vfio-migration-internal.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/vfio/vfio-migration-internal.h b/hw/vfio/vfio-migration-internal.h
index a8b456b239d..00e2badd889 100644
--- a/hw/vfio/vfio-migration-internal.h
+++ b/hw/vfio/vfio-migration-internal.h
@@ -13,7 +13,6 @@
 #include <linux/vfio.h>
 #endif
 
-#include "qemu/typedefs.h"
 #include "qemu/notify.h"
 
 /*
-- 
2.49.0



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

* [PATCH v2 3/3] system/os-win32: Remove unnecessary 'qemu/typedefs.h' include
  2025-07-08  8:58 [PATCH v2 0/3] includes: Remove unnecessary 'qemu/typedefs.h' include Philippe Mathieu-Daudé
  2025-07-08  8:58 ` [PATCH v2 1/3] hw/intc/loongarch_extioi: " Philippe Mathieu-Daudé
  2025-07-08  8:58 ` [PATCH v2 2/3] hw/vfio/vfio-migration: " Philippe Mathieu-Daudé
@ 2025-07-08  8:58 ` Philippe Mathieu-Daudé
  2025-07-08 20:53   ` Philippe Mathieu-Daudé
  2 siblings, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-07-08  8:58 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jiaxun Yang, Cédric Le Goater, Stefan Weil, Song Gao,
	Bibo Mao, Alex Williamson, Philippe Mathieu-Daudé

Commit f5fd677ae7c ("win32/socket: introduce qemu_socket_select()
helper") included the "qemu/typedefs.h" header for the Error type,
but files including "system/os-win32.h" should already include
"qemu/osdep.h", and thus "qemu/typedefs.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/system/os-win32.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/system/os-win32.h b/include/system/os-win32.h
index 3aa6cee4c23..662cfabc5e7 100644
--- a/include/system/os-win32.h
+++ b/include/system/os-win32.h
@@ -29,7 +29,6 @@
 #include <winsock2.h>
 #include <windows.h>
 #include <ws2tcpip.h>
-#include "qemu/typedefs.h"
 
 #ifdef HAVE_AFUNIX_H
 #include <afunix.h>
-- 
2.49.0



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

* Re: [PATCH v2 3/3] system/os-win32: Remove unnecessary 'qemu/typedefs.h' include
  2025-07-08  8:58 ` [PATCH v2 3/3] system/os-win32: " Philippe Mathieu-Daudé
@ 2025-07-08 20:53   ` Philippe Mathieu-Daudé
  2025-07-08 22:13     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-07-08 20:53 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jiaxun Yang, Cédric Le Goater, Stefan Weil, Song Gao,
	Bibo Mao, Alex Williamson

On 8/7/25 10:58, Philippe Mathieu-Daudé wrote:
> Commit f5fd677ae7c ("win32/socket: introduce qemu_socket_select()
> helper") included the "qemu/typedefs.h" header for the Error type,
> but files including "system/os-win32.h" should already include
> "qemu/osdep.h", and thus "qemu/typedefs.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/system/os-win32.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/include/system/os-win32.h b/include/system/os-win32.h
> index 3aa6cee4c23..662cfabc5e7 100644
> --- a/include/system/os-win32.h
> +++ b/include/system/os-win32.h
> @@ -29,7 +29,6 @@
>   #include <winsock2.h>
>   #include <windows.h>
>   #include <ws2tcpip.h>
> -#include "qemu/typedefs.h"

FTR, copying Peter's comment on v1:
http://lore.kernel.org/qemu-devel/CAFEAcA9rcJHBaeAqCM1BszrhzkE4=gxJkx9h62BVhEz9hB7OMA@mail.gmail.com

 > This one's tricky -- osdep.h includes system/os-win32.h
 > *before* it includes typedefs.h. If you want to remove this
 > include I think you need to move the include of typedefs.h
 > a bit further up in osdep.h (taking care that it's still
 > wrapped in an "extern C").
 >
 > (Or we could declare the functions in os-win32.h which
 > use the Error type somewhere else. That header I think is
 > intended to be "Windows specifics and compatibility wrappers
 > that everywhere needs to have sorted out", not "this
 > function happens to only be needed on Windows": a lot
 > of the functions declared in it are only used in a
 > handful of files and don't need to be declared to every
 > source file in the project. But that's a bit more effort.)



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

* Re: [PATCH v2 3/3] system/os-win32: Remove unnecessary 'qemu/typedefs.h' include
  2025-07-08 20:53   ` Philippe Mathieu-Daudé
@ 2025-07-08 22:13     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-07-08 22:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jiaxun Yang, Cédric Le Goater, Stefan Weil, Song Gao,
	Bibo Mao, Alex Williamson

On 8/7/25 22:53, Philippe Mathieu-Daudé wrote:
> On 8/7/25 10:58, Philippe Mathieu-Daudé wrote:
>> Commit f5fd677ae7c ("win32/socket: introduce qemu_socket_select()
>> helper") included the "qemu/typedefs.h" header for the Error type,
>> but files including "system/os-win32.h" should already include
>> "qemu/osdep.h", and thus "qemu/typedefs.h".
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   include/system/os-win32.h | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/include/system/os-win32.h b/include/system/os-win32.h
>> index 3aa6cee4c23..662cfabc5e7 100644
>> --- a/include/system/os-win32.h
>> +++ b/include/system/os-win32.h
>> @@ -29,7 +29,6 @@
>>   #include <winsock2.h>
>>   #include <windows.h>
>>   #include <ws2tcpip.h>
>> -#include "qemu/typedefs.h"
> 
> FTR, copying Peter's comment on v1:
> http://lore.kernel.org/qemu-devel/ 
> CAFEAcA9rcJHBaeAqCM1BszrhzkE4=gxJkx9h62BVhEz9hB7OMA@mail.gmail.com
> 
>  > This one's tricky -- osdep.h includes system/os-win32.h
>  > *before* it includes typedefs.h. If you want to remove this
>  > include I think you need to move the include of typedefs.h
>  > a bit further up in osdep.h (taking care that it's still
>  > wrapped in an "extern C").
>  >
>  > (Or we could declare the functions in os-win32.h which
>  > use the Error type somewhere else. That header I think is
>  > intended to be "Windows specifics and compatibility wrappers
>  > that everywhere needs to have sorted out", not "this
>  > function happens to only be needed on Windows": a lot
>  > of the functions declared in it are only used in a
>  > handful of files and don't need to be declared to every
>  > source file in the project. But that's a bit more effort.)

Amusingly qemu_socket_[un]select() are always called with Error=NULL.


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

* Re: [PATCH v2 2/3] hw/vfio/vfio-migration: Remove unnecessary 'qemu/typedefs.h' include
  2025-07-08  8:58 ` [PATCH v2 2/3] hw/vfio/vfio-migration: " Philippe Mathieu-Daudé
@ 2025-07-15  5:39   ` Cédric Le Goater
  0 siblings, 0 replies; 7+ messages in thread
From: Cédric Le Goater @ 2025-07-15  5:39 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Jiaxun Yang, Stefan Weil, Song Gao, Bibo Mao, Alex Williamson

On 7/8/25 10:58, Philippe Mathieu-Daudé wrote:
> "qemu/typedefs.h" is already included by "qemu/osdep.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/vfio/vfio-migration-internal.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/hw/vfio/vfio-migration-internal.h b/hw/vfio/vfio-migration-internal.h
> index a8b456b239d..00e2badd889 100644
> --- a/hw/vfio/vfio-migration-internal.h
> +++ b/hw/vfio/vfio-migration-internal.h
> @@ -13,7 +13,6 @@
>   #include <linux/vfio.h>
>   #endif
>   
> -#include "qemu/typedefs.h"
>   #include "qemu/notify.h"
>   
>   /*


Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.




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

end of thread, other threads:[~2025-07-15  5:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-08  8:58 [PATCH v2 0/3] includes: Remove unnecessary 'qemu/typedefs.h' include Philippe Mathieu-Daudé
2025-07-08  8:58 ` [PATCH v2 1/3] hw/intc/loongarch_extioi: " Philippe Mathieu-Daudé
2025-07-08  8:58 ` [PATCH v2 2/3] hw/vfio/vfio-migration: " Philippe Mathieu-Daudé
2025-07-15  5:39   ` Cédric Le Goater
2025-07-08  8:58 ` [PATCH v2 3/3] system/os-win32: " Philippe Mathieu-Daudé
2025-07-08 20:53   ` Philippe Mathieu-Daudé
2025-07-08 22:13     ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).