qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org,
	Konstantin Kostiuk <kkostiuk@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>
Subject: [PULL 10/20] qga: Clean up includes
Date: Tue,  7 Feb 2023 07:45:13 +0100	[thread overview]
Message-ID: <20230207064523.3968603-11-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: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20230202133830.2152150-11-armbru@redhat.com>
---
 qga/cutils.h         | 2 --
 qga/commands-posix.c | 1 -
 qga/cutils.c         | 3 ++-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/qga/cutils.h b/qga/cutils.h
index f0f30a7d28..c1f2f4b17a 100644
--- a/qga/cutils.h
+++ b/qga/cutils.h
@@ -1,8 +1,6 @@
 #ifndef CUTILS_H_
 #define CUTILS_H_
 
-#include "qemu/osdep.h"
-
 int qga_open_cloexec(const char *name, int flags, mode_t mode);
 
 #endif /* CUTILS_H_ */
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index ebd33a643c..079689d79a 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -51,7 +51,6 @@
 #else
 #include <net/ethernet.h>
 #endif
-#include <sys/types.h>
 #ifdef CONFIG_SOLARIS
 #include <sys/sockio.h>
 #endif
diff --git a/qga/cutils.c b/qga/cutils.c
index b8e142ef64..b21bcf3683 100644
--- a/qga/cutils.c
+++ b/qga/cutils.c
@@ -2,8 +2,9 @@
  * This work is licensed under the terms of the GNU GPL, version 2 or later.
  * See the COPYING file in the top-level directory.
  */
-#include "cutils.h"
 
+#include "qemu/osdep.h"
+#include "cutils.h"
 #include "qapi/error.h"
 
 /**
-- 
2.39.0



  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 ` [PULL 05/20] bsd-user: Clean up includes Markus Armbruster
2023-02-07  6:45 ` [PULL 06/20] crypto: " 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 ` Markus Armbruster [this message]
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-11-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=kkostiuk@redhat.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).