From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 07/10] vfio: Clean up includes
Date: Fri, 14 Nov 2025 15:21:07 +0000 [thread overview]
Message-ID: <20251114152110.2547285-8-peter.maydell@linaro.org> (raw)
In-Reply-To: <20251114152110.2547285-1-peter.maydell@linaro.org>
This commit was created with scripts/clean-includes:
./scripts/clean-includes --git vfio hw/vfio hw/vfio-user
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: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20251104160943.751997-9-peter.maydell@linaro.org
---
hw/vfio-user/container.h | 1 -
hw/vfio-user/device.h | 1 -
hw/vfio/pci-quirks.h | 1 -
hw/vfio-user/container.c | 2 +-
hw/vfio-user/pci.c | 2 +-
hw/vfio/ap.c | 1 -
hw/vfio/container.c | 2 +-
hw/vfio/cpr-legacy.c | 2 +-
8 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/hw/vfio-user/container.h b/hw/vfio-user/container.h
index a2b42e3169d..c952e090631 100644
--- a/hw/vfio-user/container.h
+++ b/hw/vfio-user/container.h
@@ -7,7 +7,6 @@
#ifndef HW_VFIO_USER_CONTAINER_H
#define HW_VFIO_USER_CONTAINER_H
-#include "qemu/osdep.h"
#include "hw/vfio/vfio-container.h"
#include "hw/vfio-user/proxy.h"
diff --git a/hw/vfio-user/device.h b/hw/vfio-user/device.h
index d183a3950e2..49c05848f1a 100644
--- a/hw/vfio-user/device.h
+++ b/hw/vfio-user/device.h
@@ -9,7 +9,6 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
-#include "qemu/osdep.h"
#include "linux/vfio.h"
#include "hw/vfio-user/proxy.h"
diff --git a/hw/vfio/pci-quirks.h b/hw/vfio/pci-quirks.h
index d1532e379b1..a6282e063a1 100644
--- a/hw/vfio/pci-quirks.h
+++ b/hw/vfio/pci-quirks.h
@@ -12,7 +12,6 @@
#ifndef HW_VFIO_VFIO_PCI_QUIRKS_H
#define HW_VFIO_VFIO_PCI_QUIRKS_H
-#include "qemu/osdep.h"
#include "exec/memop.h"
/*
diff --git a/hw/vfio-user/container.c b/hw/vfio-user/container.c
index e45192fef65..dab7a23224c 100644
--- a/hw/vfio-user/container.c
+++ b/hw/vfio-user/container.c
@@ -6,9 +6,9 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+#include "qemu/osdep.h"
#include <sys/ioctl.h>
#include <linux/vfio.h>
-#include "qemu/osdep.h"
#include "hw/vfio-user/container.h"
#include "hw/vfio-user/device.h"
diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c
index b53ed3b456f..353d07e7819 100644
--- a/hw/vfio-user/pci.c
+++ b/hw/vfio-user/pci.c
@@ -6,8 +6,8 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
-#include <sys/ioctl.h>
#include "qemu/osdep.h"
+#include <sys/ioctl.h>
#include "qapi-visit-sockets.h"
#include "qemu/error-report.h"
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index 7719f245797..3368ac89150 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -10,7 +10,6 @@
* directory.
*/
-#include <stdbool.h>
#include "qemu/osdep.h"
#include CONFIG_DEVICES /* CONFIG_IOMMUFD */
#include <linux/vfio.h>
diff --git a/hw/vfio/container.c b/hw/vfio/container.c
index 9ddec300e35..013a691bc5a 100644
--- a/hw/vfio/container.c
+++ b/hw/vfio/container.c
@@ -10,10 +10,10 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+#include "qemu/osdep.h"
#include <sys/ioctl.h>
#include <linux/vfio.h>
-#include "qemu/osdep.h"
#include "system/tcg.h"
#include "system/ram_addr.h"
#include "qapi/error.h"
diff --git a/hw/vfio/cpr-legacy.c b/hw/vfio/cpr-legacy.c
index 86c943158e2..7c03ddb9610 100644
--- a/hw/vfio/cpr-legacy.c
+++ b/hw/vfio/cpr-legacy.c
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
+#include "qemu/osdep.h"
#include <sys/ioctl.h>
#include <linux/vfio.h>
-#include "qemu/osdep.h"
#include "hw/vfio/vfio-container-legacy.h"
#include "hw/vfio/vfio-device.h"
#include "hw/vfio/vfio-listener.h"
--
2.43.0
next prev parent reply other threads:[~2025-11-14 15:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 15:21 [PULL 00/10] target-arm queue Peter Maydell
2025-11-14 15:21 ` [PULL 01/10] MAINTAINERS: update maintainers for WHPX Peter Maydell
2025-11-14 15:21 ` [PULL 02/10] target/arm: Fix accidental write to TCG constant Peter Maydell
2025-11-14 15:21 ` [PULL 03/10] target/arm/cpu64: remove duplicate include Peter Maydell
2025-11-14 15:21 ` [PULL 04/10] hw/display/xlnx_dp.c: Don't abort on AUX FIFO overrun/underrun Peter Maydell
2025-11-14 15:21 ` [PULL 05/10] hw/display/xlnx_dp: Don't abort for unsupported graphics formats Peter Maydell
2025-11-14 15:21 ` [PULL 06/10] cxl: Clean up includes Peter Maydell
2025-11-14 15:21 ` Peter Maydell [this message]
2025-11-14 15:21 ` [PULL 08/10] tests: " Peter Maydell
2025-11-14 15:21 ` [PULL 09/10] hw/misc/npcm_clk: Don't divide by zero when calculating frequency Peter Maydell
2025-11-14 15:21 ` [PULL 10/10] hw/audio/lm4549: Don't try to open a zero-frequency audio voice Peter Maydell
2025-11-14 19:08 ` [PULL 00/10] target-arm queue Richard Henderson
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=20251114152110.2547285-8-peter.maydell@linaro.org \
--to=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).