exec: don't include hw/boards for linux-user
PATCH 1/1 exec: don't include hw/boards for linux-user
As noted by Andreas, hw/boards.h shouldn't be used outside softmmu code. Include it conditionally, and drop the (now unnecessary) ifdef guards in hw/boards.h
Reported-by Andreas Färber <[email protected]>
Cc Peter Maydell <[email protected]>
Signed-off-by Michael S. Tsirkin <[email protected]>
--- include/hw/boards.h | 4 ---- exec.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-)
include/hw/boards.h +0 -4
@@ -3,8 +3,6 @@#ifndef HW_BOARDS_H #define HW_BOARDS_H -#if !defined(CONFIG_USER_ONLY ) -#include "qemu/typedefs.h" #include "sysemu/blockdev.h" #include "sysemu/accel.h"
@@ -158,5 +156,3 @@ struct MachineState { };#endif - -#endif
exec.c +2 -0
@@ -26,7 +26,9 @@#include "cpu.h" #include "tcg.h" #include "hw/hw.h" +#if !defined(CONFIG_USER_ONLY )#include "hw/boards.h" +#endif #include "hw/qdev.h" #include "qemu/osdep.h" #include "sysemu/kvm.h"
Signature · 1 line
MST
Quoted 37 lines · Michael S. Tsirkin
As noted by Andreas,
hw/boards.hshouldn't be used outside softmmu code. Include it conditionally, and drop the (now unnecessary) ifdef guards inhw/boards.hReported-by Andreas Färber <[email protected]>Cc Peter Maydell <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>--- include/hw/boards.h | 4 ---- exec.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-)include/hw/boards.h +0
-4@@ -3,8 +3,6 @@#ifndef HW_BOARDS_H #define HW_BOARDS_H -#if !defined(CONFIG_USER_ONLY ) -#include "qemu/typedefs.h" #include "sysemu/blockdev.h" #include "sysemu/accel.h" @@ -158,5 +156,3 @@ struct MachineState { };#endif - -#endif exec.c +0
-0
exec.c line 34
Quoted 9 lines
exec.c +2
-0@@ -26,7 +26,9 @@#include "cpu.h" #include "tcg.h" #include "hw/hw.h" +#if !defined(CONFIG_USER_ONLY )#include "hw/boards.h" +#endif #include "hw/qdev.h" #include "qemu/osdep.h" #include "sysemu/kvm.h"
Acked-by Paolo Bonzini <[email protected]>
Am 11.03.2015 um 07:58 schrieb Michael S. Tsirkin:
Quoted 36 lines
As noted by Andreas,
hw/boards.hshouldn't be used outside softmmu code. Include it conditionally, and drop the (now unnecessary) ifdef guards inhw/boards.hReported-by Andreas Färber <[email protected]>Cc Peter Maydell <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>--- include/hw/boards.h | 4 ---- exec.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-)include/hw/boards.h +0
-4@@ -3,8 +3,6 @@#ifndef HW_BOARDS_H #define HW_BOARDS_H -#if !defined(CONFIG_USER_ONLY ) -#include "qemu/typedefs.h" #include "sysemu/blockdev.h" #include "sysemu/accel.h" @@ -158,5 +156,3 @@ struct MachineState { };#endif - -#endif exec.c +0
-0
exec.c line 34
Quoted 9 lines
exec.c +2
-0@@ -26,7 +26,9 @@#include "cpu.h" #include "tcg.h" #include "hw/hw.h" +#if !defined(CONFIG_USER_ONLY )#include "hw/boards.h" +#endif #include "hw/qdev.h" #include "qemu/osdep.h" #include "sysemu/kvm.h"
Reviewed-by Andreas Färber <[email protected]>
Thanks,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg)