* [RFC PATCH] Do not include "qemu/error-report.h" in headers that do not need it
@ 2023-02-10 11:19 Thomas Huth
2023-02-10 12:39 ` Philippe Mathieu-Daudé
2023-02-10 13:43 ` Markus Armbruster
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Huth @ 2023-02-10 11:19 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, qemu-trivial, Beniamino Galvani, Peter Maydell,
Strahinja Jankovic, Coiby Xu, Gerd Hoffmann,
Marc-André Lureau, Markus Armbruster
Include it in the .c files instead that use the error reporting
functions.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
RFC since it's more lines of code - but I think it's still cleaner
this way.
include/hw/arm/allwinner-a10.h | 1 -
include/qemu/vhost-user-server.h | 1 -
include/ui/console.h | 1 -
hw/display/vhost-user-gpu.c | 1 +
hw/display/virtio-gpu-virgl.c | 1 +
hw/misc/applesmc.c | 1 +
ui/console.c | 1 +
ui/egl-headless.c | 1 +
ui/spice-app.c | 1 +
ui/spice-display.c | 1 +
ui/udmabuf.c | 1 +
ui/vdagent.c | 1 +
util/vhost-user-server.c | 1 +
13 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h
index e0f2f7ab19..79e0c80568 100644
--- a/include/hw/arm/allwinner-a10.h
+++ b/include/hw/arm/allwinner-a10.h
@@ -1,7 +1,6 @@
#ifndef HW_ARM_ALLWINNER_A10_H
#define HW_ARM_ALLWINNER_A10_H
-#include "qemu/error-report.h"
#include "hw/char/serial.h"
#include "hw/arm/boot.h"
#include "hw/pci/pci_device.h"
diff --git a/include/qemu/vhost-user-server.h b/include/qemu/vhost-user-server.h
index cd43193b80..25c72433ca 100644
--- a/include/qemu/vhost-user-server.h
+++ b/include/qemu/vhost-user-server.h
@@ -15,7 +15,6 @@
#include "io/channel-socket.h"
#include "io/channel-file.h"
#include "io/net-listener.h"
-#include "qemu/error-report.h"
#include "qapi/error.h"
#include "standard-headers/linux/virtio_blk.h"
diff --git a/include/ui/console.h b/include/ui/console.h
index 8e6cf782a1..1cb53acc33 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -4,7 +4,6 @@
#include "ui/qemu-pixman.h"
#include "qom/object.h"
#include "qemu/notify.h"
-#include "qemu/error-report.h"
#include "qapi/qapi-types-ui.h"
#ifdef CONFIG_OPENGL
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index 4380a5e672..71dfd956b8 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "qemu/sockets.h"
#include "hw/qdev-properties.h"
#include "hw/virtio/virtio-gpu.h"
diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c
index 73cb92c8d5..1c47603d40 100644
--- a/hw/display/virtio-gpu-virgl.c
+++ b/hw/display/virtio-gpu-virgl.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "qemu/iov.h"
#include "trace.h"
#include "hw/virtio/virtio.h"
diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c
index 5f9c742e50..72300d0cbc 100644
--- a/hw/misc/applesmc.c
+++ b/hw/misc/applesmc.c
@@ -34,6 +34,7 @@
#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"
#include "ui/console.h"
+#include "qemu/error-report.h"
#include "qemu/module.h"
#include "qemu/timer.h"
#include "qom/object.h"
diff --git a/ui/console.c b/ui/console.c
index ab43561fe1..98b701f5a3 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -28,6 +28,7 @@
#include "qapi/error.h"
#include "qapi/qapi-commands-ui.h"
#include "qemu/coroutine.h"
+#include "qemu/error-report.h"
#include "qemu/fifo8.h"
#include "qemu/main-loop.h"
#include "qemu/module.h"
diff --git a/ui/egl-headless.c b/ui/egl-headless.c
index 7a30fd9777..ae07e91302 100644
--- a/ui/egl-headless.c
+++ b/ui/egl-headless.c
@@ -1,4 +1,5 @@
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"
#include "ui/console.h"
diff --git a/ui/spice-app.c b/ui/spice-app.c
index 7e71e18da9..ad7f0551ad 100644
--- a/ui/spice-app.c
+++ b/ui/spice-app.c
@@ -29,6 +29,7 @@
#include "ui/console.h"
#include "ui/spice-display.h"
#include "qemu/config-file.h"
+#include "qemu/error-report.h"
#include "qemu/option.h"
#include "qemu/cutils.h"
#include "qemu/module.h"
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 0616a6982f..16802f99cb 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -17,6 +17,7 @@
#include "qemu/osdep.h"
#include "ui/qemu-spice.h"
+#include "qemu/error-report.h"
#include "qemu/timer.h"
#include "qemu/lockable.h"
#include "qemu/main-loop.h"
diff --git a/ui/udmabuf.c b/ui/udmabuf.c
index cbf4357bb1..6a0a11a85d 100644
--- a/ui/udmabuf.c
+++ b/ui/udmabuf.c
@@ -7,6 +7,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "ui/console.h"
+#include "qemu/error-report.h"
#include <sys/ioctl.h>
diff --git a/ui/vdagent.c b/ui/vdagent.c
index 1f51a78da1..8a651492f0 100644
--- a/ui/vdagent.c
+++ b/ui/vdagent.c
@@ -2,6 +2,7 @@
#include "qapi/error.h"
#include "chardev/char.h"
#include "qemu/buffer.h"
+#include "qemu/error-report.h"
#include "qemu/option.h"
#include "qemu/units.h"
#include "hw/qdev-core.h"
diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c
index 145eb17c08..40f36ea214 100644
--- a/util/vhost-user-server.c
+++ b/util/vhost-user-server.c
@@ -8,6 +8,7 @@
* later. See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "qemu/main-loop.h"
#include "qemu/vhost-user-server.h"
#include "block/aio-wait.h"
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC PATCH] Do not include "qemu/error-report.h" in headers that do not need it
2023-02-10 11:19 [RFC PATCH] Do not include "qemu/error-report.h" in headers that do not need it Thomas Huth
@ 2023-02-10 12:39 ` Philippe Mathieu-Daudé
2023-02-10 13:43 ` Markus Armbruster
1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-10 12:39 UTC (permalink / raw)
To: Thomas Huth, qemu-devel
Cc: qemu-arm, qemu-trivial, Beniamino Galvani, Peter Maydell,
Strahinja Jankovic, Coiby Xu, Gerd Hoffmann,
Marc-André Lureau, Markus Armbruster
On 10/2/23 12:19, Thomas Huth wrote:
> Include it in the .c files instead that use the error reporting
> functions.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> RFC since it's more lines of code - but I think it's still cleaner
> this way.
This is less pressure on the various .c files including these .h,
so it is an improvement IMO.
> include/hw/arm/allwinner-a10.h | 1 -
> include/qemu/vhost-user-server.h | 1 -
> include/ui/console.h | 1 -
> hw/display/vhost-user-gpu.c | 1 +
> hw/display/virtio-gpu-virgl.c | 1 +
> hw/misc/applesmc.c | 1 +
> ui/console.c | 1 +
> ui/egl-headless.c | 1 +
> ui/spice-app.c | 1 +
> ui/spice-display.c | 1 +
> ui/udmabuf.c | 1 +
> ui/vdagent.c | 1 +
> util/vhost-user-server.c | 1 +
> 13 files changed, 10 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH] Do not include "qemu/error-report.h" in headers that do not need it
2023-02-10 11:19 [RFC PATCH] Do not include "qemu/error-report.h" in headers that do not need it Thomas Huth
2023-02-10 12:39 ` Philippe Mathieu-Daudé
@ 2023-02-10 13:43 ` Markus Armbruster
2023-02-13 14:24 ` Thomas Huth
1 sibling, 1 reply; 5+ messages in thread
From: Markus Armbruster @ 2023-02-10 13:43 UTC (permalink / raw)
To: Thomas Huth
Cc: qemu-devel, qemu-arm, qemu-trivial, Beniamino Galvani,
Peter Maydell, Strahinja Jankovic, Coiby Xu, Gerd Hoffmann,
Marc-André Lureau
Thomas Huth <thuth@redhat.com> writes:
> Include it in the .c files instead that use the error reporting
> functions.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> RFC since it's more lines of code - but I think it's still cleaner
> this way.
Yes, please!
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH] Do not include "qemu/error-report.h" in headers that do not need it
2023-02-10 13:43 ` Markus Armbruster
@ 2023-02-13 14:24 ` Thomas Huth
2023-02-13 14:42 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2023-02-13 14:24 UTC (permalink / raw)
To: Markus Armbruster
Cc: qemu-devel, qemu-arm, qemu-trivial, Beniamino Galvani,
Peter Maydell, Strahinja Jankovic, Coiby Xu, Gerd Hoffmann,
Marc-André Lureau
On 10/02/2023 14.43, Markus Armbruster wrote:
> Thomas Huth <thuth@redhat.com> writes:
>
>> Include it in the .c files instead that use the error reporting
>> functions.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> RFC since it's more lines of code - but I think it's still cleaner
>> this way.
>
> Yes, please!
>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
FWIW, I just noticed (thanks to the gitlab CI) that I was missing two more
hunks:
diff --git a/ui/dbus-console.c b/ui/dbus-console.c
--- a/ui/dbus-console.c
+++ b/ui/dbus-console.c
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "qapi/error.h"
#include "ui/input.h"
#include "ui/kbd-state.h"
diff --git a/ui/gtk.c b/ui/gtk.c
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -36,6 +36,7 @@
#include "qapi/qapi-commands-machine.h"
#include "qapi/qapi-commands-misc.h"
#include "qemu/cutils.h"
+#include "qemu/error-report.h"
#include "qemu/main-loop.h"
#include "ui/console.h"
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH] Do not include "qemu/error-report.h" in headers that do not need it
2023-02-13 14:24 ` Thomas Huth
@ 2023-02-13 14:42 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-13 14:42 UTC (permalink / raw)
To: Thomas Huth, Markus Armbruster
Cc: qemu-devel, qemu-arm, qemu-trivial, Beniamino Galvani,
Peter Maydell, Strahinja Jankovic, Coiby Xu, Gerd Hoffmann,
Marc-André Lureau
On 13/2/23 15:24, Thomas Huth wrote:
> On 10/02/2023 14.43, Markus Armbruster wrote:
>> Thomas Huth <thuth@redhat.com> writes:
>>
>>> Include it in the .c files instead that use the error reporting
>>> functions.
>>>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>> ---
>>> RFC since it's more lines of code - but I think it's still cleaner
>>> this way.
>>
>> Yes, please!
>>
>> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>
> FWIW, I just noticed (thanks to the gitlab CI) that I was missing two
> more hunks:
>
> diff --git a/ui/dbus-console.c b/ui/dbus-console.c
> --- a/ui/dbus-console.c
> +++ b/ui/dbus-console.c
> @@ -22,6 +22,7 @@
> * THE SOFTWARE.
> */
> #include "qemu/osdep.h"
> +#include "qemu/error-report.h"
> #include "qapi/error.h"
> #include "ui/input.h"
> #include "ui/kbd-state.h"
> diff --git a/ui/gtk.c b/ui/gtk.c
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -36,6 +36,7 @@
> #include "qapi/qapi-commands-machine.h"
> #include "qapi/qapi-commands-misc.h"
> #include "qemu/cutils.h"
> +#include "qemu/error-report.h"
> #include "qemu/main-loop.h"
Uses without include:
$ git grep -L qemu/error-report.h \
$(git grep -wEl
'(error_report|error_report_once|error_report_once_cond)')
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-13 14:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-10 11:19 [RFC PATCH] Do not include "qemu/error-report.h" in headers that do not need it Thomas Huth
2023-02-10 12:39 ` Philippe Mathieu-Daudé
2023-02-10 13:43 ` Markus Armbruster
2023-02-13 14:24 ` Thomas Huth
2023-02-13 14:42 ` 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).