qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH] Do not include "qemu/error-report.h" in headers that do


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH] Do not include "qemu/error-report.h" in headers that do not need it
Date: Mon, 13 Feb 2023 15:42:33 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2

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>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]