From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, Warner Losh <imp@bsdimp.com>,
"Michael S . Tsirkin" <mst@redhat.com>
Subject: [PULL 05/20] bsd-user: Clean up includes
Date: Tue, 7 Feb 2023 07:45:08 +0100 [thread overview]
Message-ID: <20230207064523.3968603-6-armbru@redhat.com> (raw)
In-Reply-To: <20230207064523.3968603-1-armbru@redhat.com>
This commit was created with scripts/clean-includes.
All .c should include qemu/osdep.h first. The script performs three
related cleanups:
* Ensure .c files include qemu/osdep.h first.
* Including it in a .h is redundant, since the .c already includes
it. Drop such inclusions.
* Likewise, including headers qemu/osdep.h includes is redundant.
Drop these, too.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20230202133830.2152150-6-armbru@redhat.com>
---
bsd-user/bsd-proc.h | 4 ----
bsd-user/qemu.h | 1 -
bsd-user/arm/signal.c | 1 +
bsd-user/arm/target_arch_cpu.c | 2 ++
bsd-user/freebsd/os-sys.c | 1 +
bsd-user/i386/signal.c | 1 +
bsd-user/i386/target_arch_cpu.c | 3 +--
bsd-user/main.c | 4 +---
bsd-user/strace.c | 1 -
bsd-user/x86_64/signal.c | 1 +
bsd-user/x86_64/target_arch_cpu.c | 3 +--
11 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/bsd-user/bsd-proc.h b/bsd-user/bsd-proc.h
index 68b66e571d..a1061bffb8 100644
--- a/bsd-user/bsd-proc.h
+++ b/bsd-user/bsd-proc.h
@@ -20,11 +20,7 @@
#ifndef BSD_PROC_H_
#define BSD_PROC_H_
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
#include <sys/resource.h>
-#include <unistd.h>
/* exit(2) */
static inline abi_long do_bsd_exit(void *cpu_env, abi_long arg1)
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index be6105385e..0ceecfb6df 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -17,7 +17,6 @@
#ifndef QEMU_H
#define QEMU_H
-#include "qemu/osdep.h"
#include "cpu.h"
#include "qemu/units.h"
#include "exec/cpu_ldst.h"
diff --git a/bsd-user/arm/signal.c b/bsd-user/arm/signal.c
index 2b1dd745d1..9734407543 100644
--- a/bsd-user/arm/signal.c
+++ b/bsd-user/arm/signal.c
@@ -17,6 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
/*
diff --git a/bsd-user/arm/target_arch_cpu.c b/bsd-user/arm/target_arch_cpu.c
index 02bf9149d5..fe38ae2210 100644
--- a/bsd-user/arm/target_arch_cpu.c
+++ b/bsd-user/arm/target_arch_cpu.c
@@ -16,6 +16,8 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+
+#include "qemu/osdep.h"
#include "target_arch.h"
void target_cpu_set_tls(CPUARMState *env, target_ulong newtls)
diff --git a/bsd-user/freebsd/os-sys.c b/bsd-user/freebsd/os-sys.c
index 309e27b9d6..1676ec10f8 100644
--- a/bsd-user/freebsd/os-sys.c
+++ b/bsd-user/freebsd/os-sys.c
@@ -17,6 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
#include "target_arch_sysarch.h"
diff --git a/bsd-user/i386/signal.c b/bsd-user/i386/signal.c
index 5dd975ce56..a3131047b8 100644
--- a/bsd-user/i386/signal.c
+++ b/bsd-user/i386/signal.c
@@ -17,6 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
/*
diff --git a/bsd-user/i386/target_arch_cpu.c b/bsd-user/i386/target_arch_cpu.c
index d349e45299..2a3af2ddef 100644
--- a/bsd-user/i386/target_arch_cpu.c
+++ b/bsd-user/i386/target_arch_cpu.c
@@ -17,9 +17,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <sys/types.h>
-
#include "qemu/osdep.h"
+
#include "cpu.h"
#include "qemu.h"
#include "qemu/timer.h"
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 6f09180d65..41290e16f9 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -18,12 +18,10 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <sys/types.h>
-#include <sys/time.h>
+#include "qemu/osdep.h"
#include <sys/resource.h>
#include <sys/sysctl.h>
-#include "qemu/osdep.h"
#include "qemu/help-texts.h"
#include "qemu/units.h"
#include "qemu/accel.h"
diff --git a/bsd-user/strace.c b/bsd-user/strace.c
index a77d10dd6b..96499751eb 100644
--- a/bsd-user/strace.c
+++ b/bsd-user/strace.c
@@ -20,7 +20,6 @@
#include <sys/select.h>
#include <sys/syscall.h>
#include <sys/ioccom.h>
-#include <ctype.h>
#include "qemu.h"
diff --git a/bsd-user/x86_64/signal.c b/bsd-user/x86_64/signal.c
index c3875bc4c6..46cb865180 100644
--- a/bsd-user/x86_64/signal.c
+++ b/bsd-user/x86_64/signal.c
@@ -16,6 +16,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "qemu/osdep.h"
#include "qemu.h"
/*
diff --git a/bsd-user/x86_64/target_arch_cpu.c b/bsd-user/x86_64/target_arch_cpu.c
index be7bd10720..1d32f18907 100644
--- a/bsd-user/x86_64/target_arch_cpu.c
+++ b/bsd-user/x86_64/target_arch_cpu.c
@@ -17,9 +17,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <sys/types.h>
-
#include "qemu/osdep.h"
+
#include "cpu.h"
#include "qemu.h"
#include "qemu/timer.h"
--
2.39.0
next prev parent reply other threads:[~2023-02-07 6:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 6:45 [PULL 00/20] Header cleanup patches for 2023-02-06 Markus Armbruster
2023-02-07 6:45 ` [PULL 01/20] scripts/clean-includes: Fully skip / ignore files Markus Armbruster
2023-02-07 6:45 ` [PULL 02/20] scripts/clean-includes: Don't claim duplicate headers found when not Markus Armbruster
2023-02-07 6:45 ` [PULL 03/20] scripts/clean-includes: Skip symbolic links Markus Armbruster
2023-02-07 6:45 ` [PULL 04/20] scripts/clean-includes: Improve --git commit message Markus Armbruster
2023-02-07 6:45 ` Markus Armbruster [this message]
2023-02-07 6:45 ` [PULL 06/20] crypto: Clean up includes Markus Armbruster
2023-02-07 6:45 ` [PULL 07/20] hw/cxl: " Markus Armbruster
2023-02-07 6:45 ` [PULL 08/20] hw/input: " Markus Armbruster
2023-02-07 6:45 ` [PULL 09/20] hw/tricore: " Markus Armbruster
2023-02-07 6:45 ` [PULL 10/20] qga: " Markus Armbruster
2023-02-07 6:45 ` [PULL 11/20] migration: " Markus Armbruster
2023-02-07 6:45 ` [PULL 12/20] net: " Markus Armbruster
2023-02-07 6:45 ` [PULL 13/20] target/hexagon: " Markus Armbruster
2023-02-07 6:45 ` [PULL 14/20] riscv: " Markus Armbruster
2023-02-07 6:45 ` [PULL 15/20] block: " Markus Armbruster
2023-02-07 6:45 ` [PULL 16/20] accel: " Markus Armbruster
2023-02-07 6:45 ` [PULL 17/20] Fix non-first inclusions of qemu/osdep.h Markus Armbruster
2023-02-07 6:45 ` [PULL 18/20] Don't include headers already included by qemu/osdep.h Markus Armbruster
2023-02-07 6:45 ` [PULL 19/20] 9p: Drop superfluous include of linux/limits.h Markus Armbruster
2023-02-07 6:45 ` [PULL 20/20] Drop duplicate #include Markus Armbruster
2023-02-07 17:47 ` [PULL 00/20] Header cleanup patches for 2023-02-06 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=20230207064523.3968603-6-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=imp@bsdimp.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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 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).