diff mbox series

[v2,04/24] target/*: Use __alignof not __alignof__

Message ID 20230914024435.1381329-5-richard.henderson@linaro.org
State New
Headers show
Series Reduce usage of CPUArchState in cputlb.c | expand

Commit Message

Richard Henderson Sept. 14, 2023, 2:44 a.m. UTC
No functional change, just using a common spelling.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/cpu.c      | 2 +-
 target/ppc/cpu_init.c | 2 +-
 target/s390x/cpu.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Philippe Mathieu-Daudé Sept. 14, 2023, 6:01 a.m. UTC | #1
On 14/9/23 04:44, Richard Henderson wrote:
> No functional change, just using a common spelling.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/arm/cpu.c      | 2 +-
>   target/ppc/cpu_init.c | 2 +-
>   target/s390x/cpu.c    | 2 +-
>   3 files changed, 3 insertions(+), 3 deletions(-)

Why this one and not the other?

$ git grep -w __alignof__ | wc -l
       21
$ git grep -w __alignof | wc -l
        5

In particular:

include/qom/object.h:298:        .instance_align = 
__alignof__(ModuleObjName), \

If we have a preference, we should clean tree-wide.

Regardless,
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index b9e09a702d..906eb981b0 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -2440,7 +2440,7 @@  static const TypeInfo arm_cpu_type_info = {
     .name = TYPE_ARM_CPU,
     .parent = TYPE_CPU,
     .instance_size = sizeof(ARMCPU),
-    .instance_align = __alignof__(ARMCPU),
+    .instance_align = __alignof(ARMCPU),
     .instance_init = arm_cpu_initfn,
     .instance_finalize = arm_cpu_finalizefn,
     .abstract = true,
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 7ab5ee92d9..7830640f01 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -7413,7 +7413,7 @@  static const TypeInfo ppc_cpu_type_info = {
     .name = TYPE_POWERPC_CPU,
     .parent = TYPE_CPU,
     .instance_size = sizeof(PowerPCCPU),
-    .instance_align = __alignof__(PowerPCCPU),
+    .instance_align = __alignof(PowerPCCPU),
     .instance_init = ppc_cpu_instance_init,
     .instance_finalize = ppc_cpu_instance_finalize,
     .abstract = true,
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index df167493c3..d9625bc266 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -363,7 +363,7 @@  static const TypeInfo s390_cpu_type_info = {
     .name = TYPE_S390_CPU,
     .parent = TYPE_CPU,
     .instance_size = sizeof(S390CPU),
-    .instance_align = __alignof__(S390CPU),
+    .instance_align = __alignof(S390CPU),
     .instance_init = s390_cpu_initfn,
 
 #ifndef CONFIG_USER_ONLY