Cleanup unused included header in core.c & cluster.c
cover Cleanup unused included header in core.c & cluster.c
From: Zhao Liu <[email protected]>
Remove unused header in core.c and cluster.c, and reorder the remaining header files (except qemu/osdep.h) in alphabetical order.
Tested by "./configure" and then "make".
---
Zhao Liu (2):
hw/cpu/core: Cleanup unused included header in core.c hw/cpu/cluster: Cleanup unused included header in cluster.c
hw/cpu/cluster.c | 5 ++--- hw/cpu/core.c | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/2 hw/cpu/core: Cleanup unused included header in core.c
From: Zhao Liu <[email protected]>
Remove unused header (qemu/module.h and sysemu/cpus.h) in core.c, and reorder the remaining header files (except qemu/osdep.h) in alphabetical order.
Tested by "./configure" and then "make".
--- hw/cpu/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
hw/cpu/core.c +3 -4
@@ -8,12 +8,11 @@*/ #include "qemu/osdep.h" + +#include "hw/boards.h" #include "hw/cpu/core.h" -#include "qapi/visitor.h" -#include "qemu/module.h" #include "qapi/error.h" -#include "sysemu/cpus.h" -#include "hw/boards.h" +#include "qapi/visitor.h" static void core_prop_get_core_id (Object *obj,Visitor *v,const char *name,void *opaque,Error **errp)
Signature · 1 line
2.34.1
Re: [PATCH 1/2] hw/cpu/core: Cleanup unused included header in core.c
Quoted 6 lines · Zhao Liu
From: Zhao Liu <[email protected]>
Remove unused header (
qemu/module.handsysemu/cpus.h) incore.c, and reorder the remaining header files (exceptqemu/osdep.h) in alphabetical order.
Quoted 6 lines
Tested by "./configure" and then "make".
Signed-off-by Zhao Liu <[email protected]>--- hw/cpu/core.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
PATCH 2/2 hw/cpu/cluster: Cleanup unused included header in cluster.c
In reply to Zhao LiuFrom: Zhao Liu <[email protected]>
Remove unused header (qemu/module.h and qemu/cutils.h) in cluster.c, and reorder the remaining header files (except qemu/osdep.h) in alphabetical order.
Tested by "./configure" and then "make".
--- hw/cpu/cluster.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
hw/cpu/cluster.c +2 -3
@@ -19,12 +19,11 @@*/ #include "qemu/osdep.h" + +#include "hw/core/cpu.h" #include "hw/cpu/cluster.h" #include "hw/qdev-properties.h" -#include "hw/core/cpu.h" #include "qapi/error.h" -#include "qemu/module.h" -#include "qemu/cutils.h" static Property cpu_cluster_properties[] = {DEFINE_PROP_UINT32 ("cluster-id" , CPUClusterState, cluster_id,0 ),
Signature · 1 line
2.34.1
Re: [PATCH 2/2] hw/cpu/cluster: Cleanup unused included header in cluster.c
Quoted 6 lines · Zhao Liu
From: Zhao Liu <[email protected]>
Remove unused header (
qemu/module.handqemu/cutils.h) incluster.c, and reorder the remaining header files (exceptqemu/osdep.h) in alphabetical order.
Quoted 6 lines
Tested by "./configure" and then "make".
Signed-off-by Zhao Liu <[email protected]>--- hw/cpu/cluster.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Re: [PATCH 2/2] hw/cpu/cluster: Cleanup unused included header in cluster.c
Quoted 12 lines · Philippe Mathieu-Daudé
Date: Tue, 28 Nov 2023 11:02:00 +0100
From: Philippe Mathieu-Daudé <[email protected]>
Subject: Re: [PATCH 2/2] hw/cpu/cluster: Cleanup unused included header in
cluster.cQuoted 6 lines · Zhao Liu
From: Zhao Liu <[email protected]>
Remove unused header (
qemu/module.handqemu/cutils.h) incluster.c, and reorder the remaining header files (exceptqemu/osdep.h) in alphabetical order.
Quoted 9 lines
Quoted 6 lines
Tested by "./configure" and then "make".
Signed-off-by Zhao Liu <[email protected]>--- hw/cpu/cluster.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Thanks Philippe!
BTW, could these two patches be merged into your next tree?
I also find these 2 headers are included in many cases, maybe I can go further and do a more thorough cleaning.
Regards,
Zhao