misc/aspeed_scu: Fix build error caused by missing header
PATCH 1/1 misc/aspeed_scu: Fix build error caused by missing header
Tracing configurations error out currently as follows:
/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c: In function ‘aspeed_scu_read’:/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:9: error: implicit declaration of function ‘qemu_log_mask’ [-Werror=implicit-function-declaration] /home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:9: error: nested extern declaration of ‘qemu_log_mask’ [-Werror=nested-externs] /home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:23: error: ‘LOG_GUEST_ERROR’ undeclared (first use in this function) /home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:23: note: each undeclared identifier is reported only once for each function it appears in /home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c: In function ‘aspeed_scu_write’:/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:154:23: error: ‘LOG_GUEST_ERROR’ undeclared (first use in this function)
This is caused by a missing header file. Fix it.
--- hw/misc/aspeed_scu.c | 1 + 1 file changed, 1 insertion(+)
hw/misc/aspeed_scu.c +1 -0
@@ -15,6 +15,7 @@#include "qapi/error.h" #include "qapi/visitor.h" #include "qemu/bitops.h" +#include "qemu/log.h" #include "trace.h" #define TO_REG (offset) ((offset) >> 2)
Signature · 1 line
2.9.0
Quoted 10 lines · Pranith Kumar
Tracing configurations error out currently as follows:
/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c: In function ‘aspeed_scu_read’:/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:9: error: implicit declaration of function ‘qemu_log_mask’ [-Werror=implicit-function-declaration]/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:9: error: nested extern declaration of ‘qemu_log_mask’ [-Werror=nested-externs]/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:23: error: ‘LOG_GUEST_ERROR’ undeclared (first use in this function)/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:23: note: each undeclared identifier is reported only once for each function it appears in/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c: In function ‘aspeed_scu_write’:/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:154:23: error: ‘LOG_GUEST_ERROR’ undeclared (first use in this function)
Quoted 3 lines
This is caused by a missing header file. Fix it.
Signed-off-by Pranith Kumar <[email protected]>
Thanks for the fix. I've enabled travis on my github repo now, hopefully I'll catch this kind of issue before I send patches out. I need to look into why I didn't trigger this issue in my own change/build/test cycles.
Cheers,
Andrew
Quoted 16 lines
---
hw/misc/aspeed_scu.c | 1 +1 file changed, 1 insertion(+)hw/misc/aspeed_scu.c +1
-0@@ -15,6 +15,7 @@ #include "qapi/error.h" #include "qapi/visitor.h" #include "qemu/bitops.h" +#include "qemu/log.h" #include "trace.h"
#defineTO_REG(offset)((offset) >> 2)
Quoted 13 lines · Andrew Jeffery
Quoted 12 lines · Pranith Kumar
Tracing configurations error out currently as follows:
/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c: In function ‘aspeed_scu_read’:/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:9: error: implicit declaration of function ‘qemu_log_mask’ [-Werror=implicit-function-declaration]/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:9: error: nested extern declaration of ‘qemu_log_mask’ [-Werror=nested-externs]/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:23: error: ‘LOG_GUEST_ERROR’ undeclared (first use in this function)/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:23: note: each undeclared identifier is reported only once for each function it appears in/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c: In function ‘aspeed_scu_write’:/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:154:23: error: ‘LOG_GUEST_ERROR’ undeclared (first use in this function)This is caused by a missing header file. Fix it.
Quoted 8 lines
Quoted 1 line
Signed-off-by Pranith Kumar <[email protected]>Reviewed-by Andrew Jeffery <[email protected]>Thanks for the fix. I've enabled travis on my github repo now, hopefully I'll catch this kind of issue before I send patches out. I need to look into why I didn't trigger this issue in my own change/build/test cycles.
It only happens with certain trace backends. The default trace backend will pull in qemu/log.h via trace.h.
thanks
-- PMM
Quoted 22 lines · Pranith Kumar
Tracing configurations error out currently as follows:
/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c: In function ‘aspeed_scu_read’:/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:9: error: implicit declaration of function ‘qemu_log_mask’ [-Werror=implicit-function-declaration]/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:9: error: nested extern declaration of ‘qemu_log_mask’ [-Werror=nested-externs]/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:23: error: ‘LOG_GUEST_ERROR’ undeclared (first use in this function)/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:130:23: note: each undeclared identifier is reported only once for each function it appears in/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c: In function ‘aspeed_scu_write’:/home/travis/build/pranith/qemu/hw/misc/aspeed_scu.c:154:23: error: ‘LOG_GUEST_ERROR’ undeclared (first use in this function)This is caused by a missing header file. Fix it.
Signed-off-by Pranith Kumar <[email protected]>--- hw/misc/aspeed_scu.c | 1 + 1 file changed, 1 insertion(+)hw/misc/aspeed_scu.c +0
-0
hw/misc/aspeed_scu.c line 21
Quoted 7 lines
hw/misc/aspeed_scu.c +1
-0@@ -15,6 +15,7 @@#include "qapi/error.h" #include "qapi/visitor.h" #include "qemu/bitops.h" +#include "qemu/log.h" #include "trace.h" #define TO_REG (offset) ((offset) >> 2)
Thanks; applied to master as a build fix.
-- PMM