qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Cleanup unused included header in core.c & cluster.c
@ 2023-11-27 14:56 Zhao Liu
  2023-11-27 14:56 ` [PATCH 1/2] hw/cpu/core: Cleanup unused included header in core.c Zhao Liu
  2023-11-27 14:56 ` [PATCH 2/2] hw/cpu/cluster: Cleanup unused included header in cluster.c Zhao Liu
  0 siblings, 2 replies; 6+ messages in thread
From: Zhao Liu @ 2023-11-27 14:56 UTC (permalink / raw)
  To: Eduardo Habkost, Marcel Apfelbaum, Philippe Mathieu-Daudé,
	Yanan Wang, qemu-devel
  Cc: Zhao Liu

From: Zhao Liu <zhao1.liu@intel.com>

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(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] hw/cpu/core: Cleanup unused included header in core.c
  2023-11-27 14:56 [PATCH 0/2] Cleanup unused included header in core.c & cluster.c Zhao Liu
@ 2023-11-27 14:56 ` Zhao Liu
  2023-11-28 10:00   ` Philippe Mathieu-Daudé
  2023-11-27 14:56 ` [PATCH 2/2] hw/cpu/cluster: Cleanup unused included header in cluster.c Zhao Liu
  1 sibling, 1 reply; 6+ messages in thread
From: Zhao Liu @ 2023-11-27 14:56 UTC (permalink / raw)
  To: Eduardo Habkost, Marcel Apfelbaum, Philippe Mathieu-Daudé,
	Yanan Wang, qemu-devel
  Cc: Zhao Liu

From: Zhao Liu <zhao1.liu@intel.com>

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".

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
 hw/cpu/core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hw/cpu/core.c b/hw/cpu/core.c
index 987607515574..495a5c30ffe1 100644
--- a/hw/cpu/core.c
+++ b/hw/cpu/core.c
@@ -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)
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] hw/cpu/cluster: Cleanup unused included header in cluster.c
  2023-11-27 14:56 [PATCH 0/2] Cleanup unused included header in core.c & cluster.c Zhao Liu
  2023-11-27 14:56 ` [PATCH 1/2] hw/cpu/core: Cleanup unused included header in core.c Zhao Liu
@ 2023-11-27 14:56 ` Zhao Liu
  2023-11-28 10:02   ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 6+ messages in thread
From: Zhao Liu @ 2023-11-27 14:56 UTC (permalink / raw)
  To: Eduardo Habkost, Marcel Apfelbaum, Philippe Mathieu-Daudé,
	Yanan Wang, qemu-devel
  Cc: Zhao Liu

From: Zhao Liu <zhao1.liu@intel.com>

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".

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
 hw/cpu/cluster.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/cpu/cluster.c b/hw/cpu/cluster.c
index e444b7c29d1b..61289a840d46 100644
--- a/hw/cpu/cluster.c
+++ b/hw/cpu/cluster.c
@@ -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),
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] hw/cpu/core: Cleanup unused included header in core.c
  2023-11-27 14:56 ` [PATCH 1/2] hw/cpu/core: Cleanup unused included header in core.c Zhao Liu
@ 2023-11-28 10:00   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-11-28 10:00 UTC (permalink / raw)
  To: Zhao Liu, Eduardo Habkost, Marcel Apfelbaum, Yanan Wang,
	qemu-devel
  Cc: Zhao Liu

On 27/11/23 15:56, Zhao Liu wrote:
> From: Zhao Liu <zhao1.liu@intel.com>
> 
> 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".
> 
> Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
> ---
>   hw/cpu/core.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] hw/cpu/cluster: Cleanup unused included header in cluster.c
  2023-11-27 14:56 ` [PATCH 2/2] hw/cpu/cluster: Cleanup unused included header in cluster.c Zhao Liu
@ 2023-11-28 10:02   ` Philippe Mathieu-Daudé
  2024-01-03 14:13     ` Zhao Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-11-28 10:02 UTC (permalink / raw)
  To: Zhao Liu, Eduardo Habkost, Marcel Apfelbaum, Yanan Wang,
	qemu-devel
  Cc: Zhao Liu

On 27/11/23 15:56, Zhao Liu wrote:
> From: Zhao Liu <zhao1.liu@intel.com>
> 
> 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".
> 
> Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
> ---
>   hw/cpu/cluster.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] hw/cpu/cluster: Cleanup unused included header in cluster.c
  2023-11-28 10:02   ` Philippe Mathieu-Daudé
@ 2024-01-03 14:13     ` Zhao Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Zhao Liu @ 2024-01-03 14:13 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Eduardo Habkost, Marcel Apfelbaum, Yanan Wang, qemu-devel,
	Zhao Liu

On Tue, Nov 28, 2023 at 11:02:00AM +0100, Philippe Mathieu-Daudé wrote:
> Date: Tue, 28 Nov 2023 11:02:00 +0100
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> Subject: Re: [PATCH 2/2] hw/cpu/cluster: Cleanup unused included header in
>  cluster.c
> 
> On 27/11/23 15:56, Zhao Liu wrote:
> > From: Zhao Liu <zhao1.liu@intel.com>
> > 
> > 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".
> > 
> > Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
> > ---
> >   hw/cpu/cluster.c | 5 ++---
> >   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-01-03 14:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-27 14:56 [PATCH 0/2] Cleanup unused included header in core.c & cluster.c Zhao Liu
2023-11-27 14:56 ` [PATCH 1/2] hw/cpu/core: Cleanup unused included header in core.c Zhao Liu
2023-11-28 10:00   ` Philippe Mathieu-Daudé
2023-11-27 14:56 ` [PATCH 2/2] hw/cpu/cluster: Cleanup unused included header in cluster.c Zhao Liu
2023-11-28 10:02   ` Philippe Mathieu-Daudé
2024-01-03 14:13     ` Zhao Liu

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).