* [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix
@ 2024-04-24 17:33 Philippe Mathieu-Daudé
2024-04-24 17:33 ` [PATCH v2 1/3] hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc Philippe Mathieu-Daudé
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-04-24 17:33 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Richard Henderson,
Philippe =?unknown-8bit?q?Mathieu-Daud=C3=A9?=
v2: one more
Per our Coding Style:
If you do use template header files they should be named with
the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are
being included for expansion.
Rename elf_ops.h, helper-head.h and host/load-extract/store-insert
headers.
Philippe Mathieu-Daudé (3):
hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc
accel/tcg: Rename load-extract/store-insert headers using .h.inc
suffix
accel/tcg: Rename helper-head.h -> helper-head.h.inc
.../{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} | 0
.../host/{store-insert-al16.h => store-insert-al16.h.inc} | 0
.../{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} | 0
.../host/{store-insert-al16.h => store-insert-al16.h.inc} | 0
.../{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} | 0
.../host/{store-insert-al16.h => store-insert-al16.h.inc} | 0
.../{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} | 0
include/exec/helper-gen.h.inc | 2 +-
include/exec/{helper-head.h => helper-head.h.inc} | 0
include/exec/helper-proto.h.inc | 2 +-
include/hw/{elf_ops.h => elf_ops.h.inc} | 0
bsd-user/elfload.c | 2 +-
hw/core/loader.c | 4 ++--
linux-user/elfload.c | 2 +-
accel/tcg/ldst_atomicity.c.inc | 4 ++--
include/exec/helper-info.c.inc | 2 +-
16 files changed, 9 insertions(+), 9 deletions(-)
rename host/include/aarch64/host/{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} (100%)
rename host/include/aarch64/host/{store-insert-al16.h => store-insert-al16.h.inc} (100%)
rename host/include/generic/host/{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} (100%)
rename host/include/generic/host/{store-insert-al16.h => store-insert-al16.h.inc} (100%)
rename host/include/loongarch64/host/{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} (100%)
rename host/include/loongarch64/host/{store-insert-al16.h => store-insert-al16.h.inc} (100%)
rename host/include/x86_64/host/{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} (100%)
rename include/exec/{helper-head.h => helper-head.h.inc} (100%)
rename include/hw/{elf_ops.h => elf_ops.h.inc} (100%)
--
2.41.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/3] hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc
2024-04-24 17:33 [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix Philippe Mathieu-Daudé
@ 2024-04-24 17:33 ` Philippe Mathieu-Daudé
2024-04-24 17:33 ` [PATCH v2 2/3] accel/tcg: Rename load-extract/store-insert headers using .h.inc suffix Philippe Mathieu-Daudé
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-04-24 17:33 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Richard Henderson, Philippe Mathieu-Daudé,
Warner Losh, Kyle Evans, Laurent Vivier
Since commit 139c1837db ("meson: rename included C source files
to .c.inc"), QEMU standard procedure for included C files is to
use *.c.inc.
Besides, since commit 6a0057aa22 ("docs/devel: make a statement
about includes") this is documented in the Coding Style:
If you do use template header files they should be named with
the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are
being included for expansion.
Therefore rename "hw/elf_ops.h" as "hw/elf_ops.h.inc".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/{elf_ops.h => elf_ops.h.inc} | 0
bsd-user/elfload.c | 2 +-
hw/core/loader.c | 4 ++--
linux-user/elfload.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
rename include/hw/{elf_ops.h => elf_ops.h.inc} (100%)
diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h.inc
similarity index 100%
rename from include/hw/elf_ops.h
rename to include/hw/elf_ops.h.inc
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
index baf2f63d2f..833fa3bd05 100644
--- a/bsd-user/elfload.c
+++ b/bsd-user/elfload.c
@@ -383,7 +383,7 @@ static const char *lookup_symbolxx(struct syminfo *s, uint64_t orig_addr)
return "";
}
-/* FIXME: This should use elf_ops.h */
+/* FIXME: This should use elf_ops.h.inc */
static int symcmp(const void *s0, const void *s1)
{
struct elf_sym *sym0 = (struct elf_sym *)s0;
diff --git a/hw/core/loader.c b/hw/core/loader.c
index b8e52f3fb0..2f8105d7de 100644
--- a/hw/core/loader.c
+++ b/hw/core/loader.c
@@ -305,7 +305,7 @@ static void *load_at(int fd, off_t offset, size_t size)
#define elf_word uint32_t
#define elf_sword int32_t
#define bswapSZs bswap32s
-#include "hw/elf_ops.h"
+#include "hw/elf_ops.h.inc"
#undef elfhdr
#undef elf_phdr
@@ -327,7 +327,7 @@ static void *load_at(int fd, off_t offset, size_t size)
#define elf_sword int64_t
#define bswapSZs bswap64s
#define SZ 64
-#include "hw/elf_ops.h"
+#include "hw/elf_ops.h.inc"
const char *load_elf_strerror(ssize_t error)
{
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 60cf55b36c..0c3ddce971 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -3671,7 +3671,7 @@ static const char *lookup_symbolxx(struct syminfo *s, uint64_t orig_addr)
return "";
}
-/* FIXME: This should use elf_ops.h */
+/* FIXME: This should use elf_ops.h.inc */
static int symcmp(const void *s0, const void *s1)
{
struct elf_sym *sym0 = (struct elf_sym *)s0;
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/3] accel/tcg: Rename load-extract/store-insert headers using .h.inc suffix
2024-04-24 17:33 [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix Philippe Mathieu-Daudé
2024-04-24 17:33 ` [PATCH v2 1/3] hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc Philippe Mathieu-Daudé
@ 2024-04-24 17:33 ` Philippe Mathieu-Daudé
2024-04-24 17:33 ` [PATCH v2 3/3] accel/tcg: Rename helper-head.h -> helper-head.h.inc Philippe Mathieu-Daudé
2024-04-24 22:11 ` [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix Richard Henderson
3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-04-24 17:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Richard Henderson, Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files
to .c.inc"), QEMU standard procedure for included C files is to
use *.c.inc.
Besides, since commit 6a0057aa22 ("docs/devel: make a statement
about includes") this is documented in the Coding Style:
If you do use template header files they should be named with
the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are
being included for expansion.
Therefore rename 'store-insert-al16.h' as 'store-insert-al16.h.inc'
and 'load-extract-al16-al8.h' as 'load-extract-al16-al8.h.inc'.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
| 0
.../host/{store-insert-al16.h => store-insert-al16.h.inc} | 0
| 0
.../host/{store-insert-al16.h => store-insert-al16.h.inc} | 0
| 0
.../host/{store-insert-al16.h => store-insert-al16.h.inc} | 0
| 0
accel/tcg/ldst_atomicity.c.inc | 4 ++--
8 files changed, 2 insertions(+), 2 deletions(-)
rename host/include/aarch64/host/{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} (100%)
rename host/include/aarch64/host/{store-insert-al16.h => store-insert-al16.h.inc} (100%)
rename host/include/generic/host/{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} (100%)
rename host/include/generic/host/{store-insert-al16.h => store-insert-al16.h.inc} (100%)
rename host/include/loongarch64/host/{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} (100%)
rename host/include/loongarch64/host/{store-insert-al16.h => store-insert-al16.h.inc} (100%)
rename host/include/x86_64/host/{load-extract-al16-al8.h => load-extract-al16-al8.h.inc} (100%)
diff --git a/host/include/aarch64/host/load-extract-al16-al8.h b/host/include/aarch64/host/load-extract-al16-al8.h.inc
similarity index 100%
rename from host/include/aarch64/host/load-extract-al16-al8.h
rename to host/include/aarch64/host/load-extract-al16-al8.h.inc
diff --git a/host/include/aarch64/host/store-insert-al16.h b/host/include/aarch64/host/store-insert-al16.h.inc
similarity index 100%
rename from host/include/aarch64/host/store-insert-al16.h
rename to host/include/aarch64/host/store-insert-al16.h.inc
diff --git a/host/include/generic/host/load-extract-al16-al8.h b/host/include/generic/host/load-extract-al16-al8.h.inc
similarity index 100%
rename from host/include/generic/host/load-extract-al16-al8.h
rename to host/include/generic/host/load-extract-al16-al8.h.inc
diff --git a/host/include/generic/host/store-insert-al16.h b/host/include/generic/host/store-insert-al16.h.inc
similarity index 100%
rename from host/include/generic/host/store-insert-al16.h
rename to host/include/generic/host/store-insert-al16.h.inc
diff --git a/host/include/loongarch64/host/load-extract-al16-al8.h b/host/include/loongarch64/host/load-extract-al16-al8.h.inc
similarity index 100%
rename from host/include/loongarch64/host/load-extract-al16-al8.h
rename to host/include/loongarch64/host/load-extract-al16-al8.h.inc
diff --git a/host/include/loongarch64/host/store-insert-al16.h b/host/include/loongarch64/host/store-insert-al16.h.inc
similarity index 100%
rename from host/include/loongarch64/host/store-insert-al16.h
rename to host/include/loongarch64/host/store-insert-al16.h.inc
diff --git a/host/include/x86_64/host/load-extract-al16-al8.h b/host/include/x86_64/host/load-extract-al16-al8.h.inc
similarity index 100%
rename from host/include/x86_64/host/load-extract-al16-al8.h
rename to host/include/x86_64/host/load-extract-al16-al8.h.inc
diff --git a/accel/tcg/ldst_atomicity.c.inc b/accel/tcg/ldst_atomicity.c.inc
index 97dae70d53..134da3c1da 100644
--- a/accel/tcg/ldst_atomicity.c.inc
+++ b/accel/tcg/ldst_atomicity.c.inc
@@ -9,8 +9,8 @@
* See the COPYING file in the top-level directory.
*/
-#include "host/load-extract-al16-al8.h"
-#include "host/store-insert-al16.h"
+#include "host/load-extract-al16-al8.h.inc"
+#include "host/store-insert-al16.h.inc"
#ifdef CONFIG_ATOMIC64
# define HAVE_al8 true
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/3] accel/tcg: Rename helper-head.h -> helper-head.h.inc
2024-04-24 17:33 [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix Philippe Mathieu-Daudé
2024-04-24 17:33 ` [PATCH v2 1/3] hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc Philippe Mathieu-Daudé
2024-04-24 17:33 ` [PATCH v2 2/3] accel/tcg: Rename load-extract/store-insert headers using .h.inc suffix Philippe Mathieu-Daudé
@ 2024-04-24 17:33 ` Philippe Mathieu-Daudé
2024-04-24 22:11 ` [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix Richard Henderson
3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-04-24 17:33 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Richard Henderson, Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files
to .c.inc"), QEMU standard procedure for included C files is to
use *.c.inc.
Besides, since commit 6a0057aa22 ("docs/devel: make a statement
about includes") this is documented in the Coding Style:
If you do use template header files they should be named with
the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are
being included for expansion.
Therefore rename "exec/helper-head.h" as "exec/helper-head.h.inc".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/exec/helper-gen.h.inc | 2 +-
include/exec/{helper-head.h => helper-head.h.inc} | 0
include/exec/helper-proto.h.inc | 2 +-
include/exec/helper-info.c.inc | 2 +-
4 files changed, 3 insertions(+), 3 deletions(-)
rename include/exec/{helper-head.h => helper-head.h.inc} (100%)
diff --git a/include/exec/helper-gen.h.inc b/include/exec/helper-gen.h.inc
index c009641517..d9fd3ed72a 100644
--- a/include/exec/helper-gen.h.inc
+++ b/include/exec/helper-gen.h.inc
@@ -8,7 +8,7 @@
#include "tcg/tcg.h"
#include "tcg/helper-info.h"
-#include "exec/helper-head.h"
+#include "exec/helper-head.h.inc"
#define DEF_HELPER_FLAGS_0(name, flags, ret) \
extern TCGHelperInfo glue(helper_info_, name); \
diff --git a/include/exec/helper-head.h b/include/exec/helper-head.h.inc
similarity index 100%
rename from include/exec/helper-head.h
rename to include/exec/helper-head.h.inc
diff --git a/include/exec/helper-proto.h.inc b/include/exec/helper-proto.h.inc
index c3aa666929..f8e57e43ce 100644
--- a/include/exec/helper-proto.h.inc
+++ b/include/exec/helper-proto.h.inc
@@ -5,7 +5,7 @@
* Define HELPER_H for the header file to be expanded.
*/
-#include "exec/helper-head.h"
+#include "exec/helper-head.h.inc"
/*
* Work around an issue with --enable-lto, in which GCC's ipa-split pass
diff --git a/include/exec/helper-info.c.inc b/include/exec/helper-info.c.inc
index 530d2e6d35..c551736d49 100644
--- a/include/exec/helper-info.c.inc
+++ b/include/exec/helper-info.c.inc
@@ -7,7 +7,7 @@
#include "tcg/tcg.h"
#include "tcg/helper-info.h"
-#include "exec/helper-head.h"
+#include "exec/helper-head.h.inc"
/*
* Need one more level of indirection before stringification
--
2.41.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix
2024-04-24 17:33 [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2024-04-24 17:33 ` [PATCH v2 3/3] accel/tcg: Rename helper-head.h -> helper-head.h.inc Philippe Mathieu-Daudé
@ 2024-04-24 22:11 ` Richard Henderson
3 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2024-04-24 22:11 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini
On 4/24/24 10:33, Philippe Mathieu-Daudé wrote:
> Philippe Mathieu-Daudé (3):
> hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc
> accel/tcg: Rename load-extract/store-insert headers using .h.inc
> suffix
> accel/tcg: Rename helper-head.h -> helper-head.h.inc
Acked-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-04-24 22:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-24 17:33 [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix Philippe Mathieu-Daudé
2024-04-24 17:33 ` [PATCH v2 1/3] hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc Philippe Mathieu-Daudé
2024-04-24 17:33 ` [PATCH v2 2/3] accel/tcg: Rename load-extract/store-insert headers using .h.inc suffix Philippe Mathieu-Daudé
2024-04-24 17:33 ` [PATCH v2 3/3] accel/tcg: Rename helper-head.h -> helper-head.h.inc Philippe Mathieu-Daudé
2024-04-24 22:11 ` [PATCH v2 0/3] include: Rename some expanded headers using '.h.inc' suffix Richard Henderson
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).