All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Laurent Vivier" <laurent@vivier.eu>
Subject: [PULL 09/10] linux-user: Drop unneeded includes from qemu.h
Date: Thu, 16 Sep 2021 17:12:36 +0200	[thread overview]
Message-ID: <20210916151237.1188301-10-laurent@vivier.eu> (raw)
In-Reply-To: <20210916151237.1188301-1-laurent@vivier.eu>

From: Peter Maydell <peter.maydell@linaro.org>

Trim down the #includes in qemu.h where we can, either by
dropping unneeded headers or by moving them to user-internals.h.

This includes deleting a couple of #includes that appear at
weird points midway through the header file.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210908154405.15417-10-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/qemu.h           | 4 ----
 linux-user/user-internals.h | 2 ++
 thunk.c                     | 1 +
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index fda90fc28d68..5c713fa8ab26 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -2,7 +2,6 @@
 #define QEMU_H
 
 #include "cpu.h"
-#include "exec/exec-all.h"
 #include "exec/cpu_ldst.h"
 
 #undef DEBUG_REMAP
@@ -163,8 +162,6 @@ typedef struct TaskState {
     struct target_sigaltstack sigaltstack_used;
 } __attribute__((aligned(16))) TaskState;
 
-#include "qemu/log.h"
-
 abi_long do_brk(abi_ulong new_brk);
 
 /* user access */
@@ -349,5 +346,4 @@ void *lock_user_string(abi_ulong guest_addr);
 #define unlock_user_struct(host_ptr, guest_addr, copy)		\
     unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0)
 
-#include <pthread.h>
 #endif /* QEMU_H */
diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h
index 1729a8b62e18..661612a088b5 100644
--- a/linux-user/user-internals.h
+++ b/linux-user/user-internals.h
@@ -20,6 +20,8 @@
 
 #include "hostdep.h"
 #include "exec/user/thunk.h"
+#include "exec/exec-all.h"
+#include "qemu/log.h"
 
 extern char *exec_path;
 void init_task_state(TaskState *ts);
diff --git a/thunk.c b/thunk.c
index fc5be1a502e7..dac4bf11c65b 100644
--- a/thunk.c
+++ b/thunk.c
@@ -17,6 +17,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 #include "qemu/osdep.h"
+#include "qemu/log.h"
 
 #include "qemu.h"
 #include "exec/user/thunk.h"
-- 
2.31.1



  parent reply	other threads:[~2021-09-16 15:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 15:12 [PULL 00/10] Linux user for 6.2 patches Laurent Vivier
2021-09-16 15:12 ` [PULL 01/10] linux-user: Fix coding style nits in qemu.h Laurent Vivier
2021-09-16 15:12 ` [PULL 02/10] linux-user: Split strace prototypes into strace.h Laurent Vivier
2021-09-16 15:12 ` [PULL 03/10] linux-user: Split signal-related prototypes into signal-common.h Laurent Vivier
2021-09-16 15:12 ` [PULL 04/10] linux-user: Split loader-related prototypes into loader.h Laurent Vivier
2021-09-16 15:12 ` [PULL 05/10] linux-user: Split mmap prototypes into user-mmap.h Laurent Vivier
2021-09-16 15:12 ` [PULL 06/10] linux-user: Split safe-syscall macro into its own header Laurent Vivier
2021-09-16 15:12 ` [PULL 07/10] linux-user: Split linux-user internals out of qemu.h Laurent Vivier
2021-09-16 15:12 ` [PULL 08/10] linux-user: Don't include gdbstub.h in qemu.h Laurent Vivier
2021-09-16 15:12 ` Laurent Vivier [this message]
2021-09-16 15:12 ` [PULL 10/10] linux-user: Check lock_user result for ip_mreq_source sockopts Laurent Vivier
2021-09-17  9:05 ` [PULL 00/10] Linux user for 6.2 patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210916151237.1188301-10-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.