include: Don't include qemu/osdep.h
Subsystems (3)
PATCH 1/1 include: Don't include qemu/osdep.h
docs/devel/style.rst mandates:
The "qemu/osdep.h" header contains preprocessor macros that affect the behavior of core system headers like <stdint.h>. It must be the first include so that core system headers included by external libraries get the preprocessor macros that QEMU depends on.
Do not include "qemu/osdep.h" from header files since the .c file will have already included it.
A few violations have crept in. Fix them.
--- bsd-user/qemu.h | 1 - crypto/block-luks-priv.h | 1 - include/hw/cxl/cxl_host.h | 1 - include/hw/input/pl050.h | 1 - include/hw/tricore/triboard.h | 1 - include/qemu/userfaultfd.h | 1 - net/vmnet_int.h | 1 - qga/cutils.h | 1 - target/hexagon/hex_arch_types.h | 1 - target/hexagon/mmvec/macros.h | 1 - target/riscv/pmu.h | 1 - qga/cutils.c | 3 ++- 12 files changed, 2 insertions(+), 12 deletions(-)
bsd-user/qemu.h +0 -1
@@ -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"
crypto/block-luks-priv.h +0 -1
@@ -18,7 +18,6 @@* */ -#include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/bswap.h"
include/hw/cxl/cxl_host.h +0 -1
@@ -7,7 +7,6 @@* COPYING file in the top-level directory. */ -#include "qemu/osdep.h" #include "hw/cxl/cxl.h" #include "hw/boards.h"
include/hw/input/pl050.h +0 -1
@@ -10,7 +10,6 @@#ifndef HW_PL050_H #define HW_PL050_H -#include "qemu/osdep.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "hw/input/ps2.h"
include/hw/tricore/triboard.h +0 -1
@@ -18,7 +18,6 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include "qemu/osdep.h" #include "qapi/error.h" #include "hw/boards.h" #include "sysemu/sysemu.h"
include/qemu/userfaultfd.h +0 -1
@@ -13,7 +13,6 @@#ifndef USERFAULTFD_H #define USERFAULTFD_H -#include "qemu/osdep.h" #include "exec/hwaddr.h" #include <linux/userfaultfd.h>
net/vmnet_int.h +0 -1
@@ -10,7 +10,6 @@#ifndef VMNET_INT_H #define VMNET_INT_H -#include "qemu/osdep.h" #include "vmnet_int.h" #include "clients.h"
qga/cutils.h +0 -1
@@ -1,7 +1,6 @@#ifndef CUTILS_H_ #define CUTILS_H_ -#include "qemu/osdep.h" int qga_open_cloexec (const char *name,int flags,mode_t mode);
target/hexagon/hex_arch_types.h +0 -1
@@ -18,7 +18,6 @@#ifndef HEXAGON_HEX_ARCH_TYPES_H #define HEXAGON_HEX_ARCH_TYPES_H -#include "qemu/osdep.h" #include "mmvec/mmvec.h" #include "qemu/int128.h"
target/hexagon/mmvec/macros.h +0 -1
@@ -18,7 +18,6 @@#ifndef HEXAGON_MMVEC_MACROS_H #define HEXAGON_MMVEC_MACROS_H -#include "qemu/osdep.h" #include "qemu/host-utils.h" #include "arch.h" #include "mmvec/system_ext_mmvec.h"
target/riscv/pmu.h +0 -1
@@ -16,7 +16,6 @@* this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "qemu/osdep.h" #include "qemu/log.h" #include "cpu.h" #include "qemu/main-loop.h"
qga/cutils.c +2 -1
@@ -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" /**
Signature · 1 line
2.37.3
Quoted 13 lines · Markus Armbruster
docs/devel/style.rstmandates:The "
qemu/osdep.h" header contains preprocessor macros that affect the behavior of core system headers like <stdint.h>. It must be the first include so that core system headers included by external libraries get the preprocessor macros that QEMU depends on.Do not include "
qemu/osdep.h" from header files since the .c file will have already included it.A few violations have crept in. Fix them.
Signed-off-by Markus Armbruster <[email protected]>
Quoted 14 lines
--- bsd-user/qemu.h | 1 - crypto/block-luks-priv.h | 1 - include/hw/cxl/cxl_host.h | 1 - include/hw/input/pl050.h | 1 - include/hw/tricore/triboard.h | 1 - include/qemu/userfaultfd.h | 1 - net/vmnet_int.h | 1 - qga/cutils.h | 1 - target/hexagon/hex_arch_types.h | 1 - target/hexagon/mmvec/macros.h | 1 - target/riscv/pmu.h | 1 - qga/cutils.c | 3 ++- 12 files changed, 2 insertions(+), 12 deletions(-)
Quoted 14 lines · Markus Armbruster
docs/devel/style.rstmandates:The "
qemu/osdep.h" header contains preprocessor macros that affect the behavior of core system headers like <stdint.h>. It must be the first include so that core system headers included by external libraries get the preprocessor macros that QEMU depends on.Do not include "
qemu/osdep.h" from header files since the .c file will have already included it.A few violations have crept in. Fix them.
Signed-off-by Markus Armbruster <[email protected]>
Quoted 15 lines
--- bsd-user/qemu.h | 1 - crypto/block-luks-priv.h | 1 - include/hw/cxl/cxl_host.h | 1 - include/hw/input/pl050.h | 1 - include/hw/tricore/triboard.h | 1 - include/qemu/userfaultfd.h | 1 - net/vmnet_int.h | 1 - qga/cutils.h | 1 - target/hexagon/hex_arch_types.h | 1 - target/hexagon/mmvec/macros.h | 1 - target/riscv/pmu.h | 1 - qga/cutils.c | 3 ++- 12 files changed, 2 insertions(+), 12 deletions(-)
Quoted 47 lines
-----Original Message-----
From: Markus Armbruster <[email protected]>
Sent: Monday, December 12, 2022 1:05 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Taylor Simpson <[email protected]>; [email protected]; [email protected]; [email protected]; qemu- [email protected]
Subject: [PATCH] include: Don't includeqemu/osdep.h
docs/devel/style.rstmandates:The "
qemu/osdep.h" header contains preprocessor macros that affect the behavior of core system headers like <stdint.h>. It must be the first include so that core system headers included by external libraries get the preprocessor macros that QEMU depends on.Do not include "
qemu/osdep.h" from header files since the .c file will have already included it.A few violations have crept in. Fix them.
Signed-off-by Markus Armbruster <[email protected]>--- bsd-user/qemu.h | 1 - crypto/block-luks-priv.h | 1 - include/hw/cxl/cxl_host.h | 1 - include/hw/input/pl050.h | 1 - include/hw/tricore/triboard.h | 1 - include/qemu/userfaultfd.h | 1 - net/vmnet_int.h | 1 - qga/cutils.h | 1 - target/hexagon/hex_arch_types.h | 1 - target/hexagon/mmvec/macros.h | 1 - target/riscv/pmu.h | 1 - qga/cutils.c | 3 ++- 12 files changed, 2 insertions(+), 12 deletions(-)(quoted diff) +0
-0
b/target/hexagon/hex_arch_types.hindex885f68f760..52a7f2b2f3100644
target/hexagon/hex_arch_types.h line 22
Quoted 6 lines
target/hexagon/hex_arch_types.h +0
-1@@ -18,7 +18,6 @@#ifndef HEXAGON_HEX_ARCH_TYPES_H #define HEXAGON_HEX_ARCH_TYPES_H -#include "qemu/osdep.h" #include "mmvec/mmvec.h" #include "qemu/int128.h"
Please change the copyright year in this file from "2019-2021" to "2019-2022".
Otherwise
Quoted 50 lines · Taylor Simpson
Quoted 50 lines
-----Original Message-----
From: Markus Armbruster <[email protected]>
Sent: Monday, December 12, 2022 1:05 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Taylor Simpson <[email protected]>; [email protected]; [email protected]; [email protected]; qemu- [email protected]
Subject: [PATCH] include: Don't includeqemu/osdep.h
docs/devel/style.rstmandates:The "
qemu/osdep.h" header contains preprocessor macros that affect the behavior of core system headers like <stdint.h>. It must be the first include so that core system headers included by external libraries get the preprocessor macros that QEMU depends on.Do not include "
qemu/osdep.h" from header files since the .c file will have already included it.A few violations have crept in. Fix them.
Signed-off-by Markus Armbruster <[email protected]>--- bsd-user/qemu.h | 1 - crypto/block-luks-priv.h | 1 - include/hw/cxl/cxl_host.h | 1 - include/hw/input/pl050.h | 1 - include/hw/tricore/triboard.h | 1 - include/qemu/userfaultfd.h | 1 - net/vmnet_int.h | 1 - qga/cutils.h | 1 - target/hexagon/hex_arch_types.h | 1 - target/hexagon/mmvec/macros.h | 1 - target/riscv/pmu.h | 1 - qga/cutils.c | 3 ++- 12 files changed, 2 insertions(+), 12 deletions(-)(quoted diff) +0
-0
b/target/hexagon/hex_arch_types.hindex885f68f760..52a7f2b2f3100644target/hexagon/hex_arch_types.h +0
-0@@ -18,7 +18,6 @@#ifndef HEXAGON_HEX_ARCH_TYPES_H #define HEXAGON_HEX_ARCH_TYPES_H
Quoted 5 lines
target/hexagon/hex_arch_types.h line 22
Quoted 3 lines
target/hexagon/hex_arch_types.h +0
-1-#include "qemu/osdep.h" #include "mmvec/mmvec.h" #include "qemu/int128.h" Please change the copyright year in this file from "2019-2021" to "2019-2022".
No, that would be inappropriate.
The Copyright line is attributed to Qualcomm, and Markus doesn't work for, nor assign copyright to, Qualcomm, so he must not change the Qualcomm copyright line. Further, merely deleting a line of code is not a significant change from POV of claiming copyright.
Quoted 2 lines
Otherwise
Reviewed-by Taylor Simpson <[email protected]>
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 8 lines · Markus Armbruster
docs/devel/style.rstmandates:The "
qemu/osdep.h" header contains preprocessor macros that affect the behavior of core system headers like <stdint.h>. It must be the first include so that core system headers included by external libraries get the preprocessor macros that QEMU depends on.
Quoted 6 lines
Do not include "
qemu/osdep.h" from header files since the .c file will have already included it.A few violations have crept in. Fix them.
Signed-off-by Markus Armbruster <[email protected]>
Alistair
Quoted 166 lines
--- bsd-user/qemu.h | 1 - crypto/block-luks-priv.h | 1 - include/hw/cxl/cxl_host.h | 1 - include/hw/input/pl050.h | 1 - include/hw/tricore/triboard.h | 1 - include/qemu/userfaultfd.h | 1 - net/vmnet_int.h | 1 - qga/cutils.h | 1 - target/hexagon/hex_arch_types.h | 1 - target/hexagon/mmvec/macros.h | 1 - target/riscv/pmu.h | 1 - qga/cutils.c | 3 ++- 12 files changed, 2 insertions(+), 12 deletions(-)bsd-user/qemu.h +0
-1@@ -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" crypto/block-luks-priv.h +0
-1@@ -18,7 +18,6 @@* */ -#include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/bswap.h" include/hw/cxl/cxl_host.h +0
-1@@ -7,7 +7,6 @@* COPYING file in the top-level directory. */ -#include "qemu/osdep.h" #include "hw/cxl/cxl.h" #include "hw/boards.h" include/hw/input/pl050.h +0
-1@@ -10,7 +10,6 @@#ifndef HW_PL050_H #define HW_PL050_H -#include "qemu/osdep.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "hw/input/ps2.h" include/hw/tricore/triboard.h +0
-1@@ -18,7 +18,6 @@* License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include "qemu/osdep.h" #include "qapi/error.h" #include "hw/boards.h" #include "sysemu/sysemu.h" include/qemu/userfaultfd.h +0
-1@@ -13,7 +13,6 @@#ifndef USERFAULTFD_H #define USERFAULTFD_H -#include "qemu/osdep.h" #include "exec/hwaddr.h" #include <linux/userfaultfd.h> net/vmnet_int.h +0
-1@@ -10,7 +10,6 @@#ifndef VMNET_INT_H #define VMNET_INT_H -#include "qemu/osdep.h" #include "vmnet_int.h" #include "clients.h" qga/cutils.h +0
-1@@ -1,7 +1,6 @@#ifndef CUTILS_H_ #define CUTILS_H_ -#include "qemu/osdep.h" int qga_open_cloexec (const char *name,int flags,mode_t mode);target/hexagon/hex_arch_types.h +0
-1@@ -18,7 +18,6 @@#ifndef HEXAGON_HEX_ARCH_TYPES_H #define HEXAGON_HEX_ARCH_TYPES_H -#include "qemu/osdep.h" #include "mmvec/mmvec.h" #include "qemu/int128.h" target/hexagon/mmvec/macros.h +0
-1@@ -18,7 +18,6 @@#ifndef HEXAGON_MMVEC_MACROS_H #define HEXAGON_MMVEC_MACROS_H -#include "qemu/osdep.h" #include "qemu/host-utils.h" #include "arch.h" #include "mmvec/system_ext_mmvec.h" target/riscv/pmu.h +0
-1@@ -16,7 +16,6 @@* this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "qemu/osdep.h" #include "qemu/log.h" #include "cpu.h" #include "qemu/main-loop.h" qga/cutils.c +2
-2@@ -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.37.3