diff mbox

misc/aspeed_scu: Fix build error caused by missing header

Message ID 20160627215304.821-1-bobby.prani@gmail.com
State New
Headers show

Commit Message

Pranith Kumar June 27, 2016, 9:53 p.m. UTC
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 <bobby.prani@gmail.com>
---
 hw/misc/aspeed_scu.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andrew Jeffery June 27, 2016, 11:05 p.m. UTC | #1
On Mon, 2016-06-27 at 17:53 -0400, Pranith Kumar wrote:
> 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 <bobby.prani@gmail.com>

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>

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

> ---
>  hw/misc/aspeed_scu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c
> index 4f9df58..23f5175 100644
> --- a/hw/misc/aspeed_scu.c
> +++ b/hw/misc/aspeed_scu.c
> @@ -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)
Peter Maydell June 28, 2016, 8:35 a.m. UTC | #2
On 28 June 2016 at 00:05, Andrew Jeffery <andrew@aj.id.au> wrote:
> On Mon, 2016-06-27 at 17:53 -0400, Pranith Kumar wrote:
>> 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 <bobby.prani@gmail.com>
>
> Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
>
> 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
Peter Maydell June 28, 2016, 9:31 a.m. UTC | #3
On 27 June 2016 at 22:53, Pranith Kumar <bobby.prani@gmail.com> wrote:
> 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 <bobby.prani@gmail.com>
> ---
>  hw/misc/aspeed_scu.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c
> index 4f9df58..23f5175 100644
> --- a/hw/misc/aspeed_scu.c
> +++ b/hw/misc/aspeed_scu.c
> @@ -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
diff mbox

Patch

diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c
index 4f9df58..23f5175 100644
--- a/hw/misc/aspeed_scu.c
+++ b/hw/misc/aspeed_scu.c
@@ -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)