includes: Remove unnecessary 'qemu/typedefs.h' include
v2 cover includes: Remove unnecessary 'qemu/typedefs.h' include
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(-)
Signature · 1 line
2.49.0
PATCH v2 1/3 hw/intc/loongarch_extioi: Remove unnecessary 'qemu/typedefs.h' include
"qemu/typedefs.h" is already included by "qemu/osdep.h".
--- hw/intc/loongarch_extioi_kvm.c | 1 - 1 file changed, 1 deletion(-)
hw/intc/loongarch_extioi_kvm.c +0 -1
@@ -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"
Signature · 1 line
2.49.0
PATCH v2 2/3 hw/vfio/vfio-migration: Remove unnecessary 'qemu/typedefs.h' include
In reply to Philippe Mathieu-Daudé"qemu/typedefs.h" is already included by "qemu/osdep.h".
--- hw/vfio/vfio-migration-internal.h | 1 - 1 file changed, 1 deletion(-)
hw/vfio/vfio-migration-internal.h +0 -1
@@ -13,7 +13,6 @@#include <linux/vfio.h> #endif -#include "qemu/typedefs.h" #include "qemu/notify.h" /*
Signature · 1 line
2.49.0
Re: [PATCH v2 2/3] hw/vfio/vfio-migration: Remove unnecessary 'qemu/typedefs.h' include
Quoted 12 lines · Philippe Mathieu-Daudé
"
qemu/typedefs.h" is already included by "qemu/osdep.h".Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/vfio/vfio-migration-internal.h | 1 - 1 file changed, 1 deletion(-)hw/vfio/vfio-migration-internal.h +0
-0
hw/vfio/vfio-migration-internal.h line 18
Quoted 7 lines
hw/vfio/vfio-migration-internal.h +0
-1@@ -13,7 +13,6 @@#include <linux/vfio.h> #endif -#include "qemu/typedefs.h" #include "qemu/notify.h" /*
Thanks,
C.
PATCH v2 3/3 system/os-win32: Remove unnecessary 'qemu/typedefs.h' include
In reply to 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".
--- include/system/os-win32.h | 1 - 1 file changed, 1 deletion(-)
include/system/os-win32.h +0 -1
@@ -29,7 +29,6 @@#include <winsock2.h> #include <windows.h> #include <ws2tcpip.h> -#include "qemu/typedefs.h" #ifdef HAVE_AFUNIX_H #include <afunix.h>
Signature · 1 line
2.49.0
Re: [PATCH v2 3/3] system/os-win32: Remove unnecessary 'qemu/typedefs.h' include
Quoted 15 lines · Philippe Mathieu-Daudé
Commit
f5fd677ae7c("win32/socket: introduceqemu_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é <[email protected]>--- include/system/os-win32.h | 1 - 1 file changed, 1 deletion(-)include/system/os-win32.h +0
-0
include/system/os-win32.h line 32
Quoted 4 lines
include/system/os-win32.h +0
-1@@ -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
Quoted 14 lines
This one's tricky --
osdep.hincludessystem/os-win32.h*before* it includestypedefs.h. If you want to remove this include I think you need to move the include oftypedefs.ha bit further up inosdep.h(taking care that it's still wrapped in an "extern C").(Or we could declare the functions in
os-win32.hwhich 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.)
Re: [PATCH v2 3/3] system/os-win32: Remove unnecessary 'qemu/typedefs.h' include
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 10 lines · Philippe Mathieu-Daudé
Commit
f5fd677ae7c("win32/socket: introduceqemu_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é <[email protected]>---
include/system/os-win32.h| 1 -1 file changed, 1 deletion(-)
Quoted 27 lines
include/system/os-win32.h line 32
Quoted 9 lines
include/system/os-win32.h +0
-1@@ -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.comQuoted 14 lines
This one's tricky --
osdep.hincludessystem/os-win32.h*before* it includestypedefs.h. If you want to remove this include I think you need to move the include oftypedefs.ha bit further up inosdep.h(taking care that it's still wrapped in an "extern C").(Or we could declare the functions in
os-win32.hwhich 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.