Skip to contentSkip to conversation

misc/aspeed_scu: Fix build error caused by missing header

PATCH In review Pranith Kumar 3 participants 4 messages Jun 27, 2016 – Jun 28, 2016 Arm/Aspeed machine support

lore
Share & tools
lore
#0 lore raw

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
index 4f9df58..23f5175 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
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.

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
index 4f9df58..23f5175 100644
@@ -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)

#2 lore raw
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

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

#3 lore raw
In reply to Pranith Kumar
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.

---
 hw/misc/aspeed_scu.c | 1 +
 1 file changed, 1 insertion(+)
hw/misc/aspeed_scu.c +0 -0
index 4f9df58..23f5175 100644

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