[PATCH 5/9] target/openrisc: Avoid target-specific migration headers in machine.c

Philippe Mathieu-Daudé posted 9 patches 1 month ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>, Laurent Vivier <laurent@vivier.eu>, Stafford Horne <shorne@gmail.com>, Yoshinori Sato <yoshinori.sato@nifty.com>, Bastian Koppelmann <kbastian@rumtueddeln.de>
[PATCH 5/9] target/openrisc: Avoid target-specific migration headers in machine.c
Posted by Philippe Mathieu-Daudé 1 month ago
machine.c doesn't use any target-specific macro defined by
the "migration/cpu.h" header. Use the minimum header requiered:
"migration/qemu-file-types.h" and "migration/vmstate.h", which
are not target-specific.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/openrisc/machine.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/openrisc/machine.c b/target/openrisc/machine.c
index f2853674f0f..2d5ca16c511 100644
--- a/target/openrisc/machine.c
+++ b/target/openrisc/machine.c
@@ -19,7 +19,8 @@
 
 #include "qemu/osdep.h"
 #include "cpu.h"
-#include "migration/cpu.h"
+#include "migration/qemu-file-types.h"
+#include "migration/vmstate.h"
 
 static const VMStateDescription vmstate_tlb_entry = {
     .name = "tlb_entry",
-- 
2.52.0


Re: [PATCH 5/9] target/openrisc: Avoid target-specific migration headers in machine.c
Posted by Richard Henderson 4 weeks, 1 day ago
On 1/8/26 07:06, Philippe Mathieu-Daudé wrote:
> machine.c doesn't use any target-specific macro defined by
> the "migration/cpu.h" header. Use the minimum header requiered:
> "migration/qemu-file-types.h" and "migration/vmstate.h", which
> are not target-specific.
> 
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   target/openrisc/machine.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

Re: [PATCH 5/9] target/openrisc: Avoid target-specific migration headers in machine.c
Posted by Prasad Pandit 1 month ago
On Thu, 8 Jan 2026 at 01:41, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
> machine.c doesn't use any target-specific macro defined by
> the "migration/cpu.h" header. Use the minimum header requiered:

* requiered -> required

> "migration/qemu-file-types.h" and "migration/vmstate.h", which are not target-specific.

* They are included via migration/cpu.h too; Still the change looks fine.

> diff --git a/target/openrisc/machine.c b/target/openrisc/machine.c
> index f2853674f0f..2d5ca16c511 100644
> --- a/target/openrisc/machine.c
> +++ b/target/openrisc/machine.c
> @@ -19,7 +19,8 @@
>
>  #include "qemu/osdep.h"
>  #include "cpu.h"
> -#include "migration/cpu.h"
> +#include "migration/qemu-file-types.h"
> +#include "migration/vmstate.h"
>
>  static const VMStateDescription vmstate_tlb_entry = {
>      .name = "tlb_entry",

Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>

Thank you.
---
  - Prasad