diff mbox

[v2] device-tree: Make a common-obj

Message ID 1432498814-1469-1-git-send-email-crosthwaite.peter@gmail.com
State New
Headers show

Commit Message

Peter Crosthwaite May 24, 2015, 8:20 p.m. UTC
There is no reason for device tree API to be built per-target.
common-obj it. There is an extraneous inclusion of config.h that
needs to be removed.

Cc: Alexander Graf <agraf@suse.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
---
 Makefile.objs   | 2 ++
 Makefile.target | 1 -
 device_tree.c   | 1 -
 3 files changed, 2 insertions(+), 2 deletions(-)

Comments

Alexander Graf May 25, 2015, 8:46 p.m. UTC | #1
On 24.05.15 22:20, Peter Crosthwaite wrote:
> There is no reason for device tree API to be built per-target.
> common-obj it. There is an extraneous inclusion of config.h that
> needs to be removed.
> 
> Cc: Alexander Graf <agraf@suse.de>
> Reviewed-by: Andreas Färber <afaerber@suse.de>
> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>

Doesn't this mean that we're now linking against libfdt on
qemu-system-x86_64?


Alex

> ---
>  Makefile.objs   | 2 ++
>  Makefile.target | 1 -
>  device_tree.c   | 1 -
>  3 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.objs b/Makefile.objs
> index 28999d3..4881d2c 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -76,6 +76,8 @@ common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
>  
>  common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
>  
> +common-obj-$(CONFIG_FDT) += device_tree.o
> +
>  ######################################################################
>  # qapi
>  
> diff --git a/Makefile.target b/Makefile.target
> index 1083377..5100013 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -129,7 +129,6 @@ ifdef CONFIG_SOFTMMU
>  obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o numa.o
>  obj-y += qtest.o bootdevice.o
>  obj-y += hw/
> -obj-$(CONFIG_FDT) += device_tree.o
>  obj-$(CONFIG_KVM) += kvm-all.o
>  obj-y += memory.o savevm.o cputlb.o
>  obj-y += memory_mapping.o
> diff --git a/device_tree.c b/device_tree.c
> index 3d119ef..d2de580 100644
> --- a/device_tree.c
> +++ b/device_tree.c
> @@ -18,7 +18,6 @@
>  #include <unistd.h>
>  #include <stdlib.h>
>  
> -#include "config.h"
>  #include "qemu-common.h"
>  #include "qemu/error-report.h"
>  #include "sysemu/device_tree.h"
>
Paolo Bonzini May 25, 2015, 11:01 p.m. UTC | #2
On 25/05/2015 22:46, Alexander Graf wrote:
> 
> On 24.05.15 22:20, Peter Crosthwaite wrote:
>> > There is no reason for device tree API to be built per-target.
>> > common-obj it. There is an extraneous inclusion of config.h that
>> > needs to be removed.
>> > 
>> > Cc: Alexander Graf <agraf@suse.de>
>> > Reviewed-by: Andreas Färber <afaerber@suse.de>
>> > Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
> Doesn't this mean that we're now linking against libfdt on
> qemu-system-x86_64?

We already are.

Paolo
Alexander Graf May 25, 2015, 11:07 p.m. UTC | #3
On 26.05.15 01:01, Paolo Bonzini wrote:
> 
> 
> On 25/05/2015 22:46, Alexander Graf wrote:
>>
>> On 24.05.15 22:20, Peter Crosthwaite wrote:
>>>> There is no reason for device tree API to be built per-target.
>>>> common-obj it. There is an extraneous inclusion of config.h that
>>>> needs to be removed.
>>>>
>>>> Cc: Alexander Graf <agraf@suse.de>
>>>> Reviewed-by: Andreas Färber <afaerber@suse.de>
>>>> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
>> Doesn't this mean that we're now linking against libfdt on
>> qemu-system-x86_64?
> 
> We already are.

Oh :(


Alex
Michael Tokarev May 28, 2015, 12:04 p.m. UTC | #4
24.05.2015 23:20, Peter Crosthwaite wrote:
> There is no reason for device tree API to be built per-target.
> common-obj it. There is an extraneous inclusion of config.h that
> needs to be removed.
> 
> Cc: Alexander Graf <agraf@suse.de>
> Reviewed-by: Andreas Färber <afaerber@suse.de>
> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>

Applied to -trivial, thank you!

/mjt
diff mbox

Patch

diff --git a/Makefile.objs b/Makefile.objs
index 28999d3..4881d2c 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -76,6 +76,8 @@  common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
 
 common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
 
+common-obj-$(CONFIG_FDT) += device_tree.o
+
 ######################################################################
 # qapi
 
diff --git a/Makefile.target b/Makefile.target
index 1083377..5100013 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -129,7 +129,6 @@  ifdef CONFIG_SOFTMMU
 obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o numa.o
 obj-y += qtest.o bootdevice.o
 obj-y += hw/
-obj-$(CONFIG_FDT) += device_tree.o
 obj-$(CONFIG_KVM) += kvm-all.o
 obj-y += memory.o savevm.o cputlb.o
 obj-y += memory_mapping.o
diff --git a/device_tree.c b/device_tree.c
index 3d119ef..d2de580 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -18,7 +18,6 @@ 
 #include <unistd.h>
 #include <stdlib.h>
 
-#include "config.h"
 #include "qemu-common.h"
 #include "qemu/error-report.h"
 #include "sysemu/device_tree.h"