[PATCH] memory-device: simplify Makefile.objs conditions

Paolo Bonzini posted 1 patch 6 years ago
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191021171120.17947-1-pbonzini@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>
hw/mem/Makefile.objs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] memory-device: simplify Makefile.objs conditions
Posted by Paolo Bonzini 6 years ago
hw/mem/ is only included if CONFIG_MEM_DEVICE is true, so we need not
specify the condition again in hw/mem/Makefile.objs.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/mem/Makefile.objs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/mem/Makefile.objs b/hw/mem/Makefile.objs
index 3e2f7c5ca2..56345befd0 100644
--- a/hw/mem/Makefile.objs
+++ b/hw/mem/Makefile.objs
@@ -1,3 +1,3 @@
 common-obj-$(CONFIG_DIMM) += pc-dimm.o
-common-obj-$(CONFIG_MEM_DEVICE) += memory-device.o
+common-obj-y += memory-device.o
 common-obj-$(CONFIG_NVDIMM) += nvdimm.o
-- 
2.21.0


Re: [PATCH] memory-device: simplify Makefile.objs conditions
Posted by Thomas Huth 6 years ago
On 21/10/2019 19.11, Paolo Bonzini wrote:
> hw/mem/ is only included if CONFIG_MEM_DEVICE is true, so we need not
> specify the condition again in hw/mem/Makefile.objs.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/mem/Makefile.objs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/mem/Makefile.objs b/hw/mem/Makefile.objs
> index 3e2f7c5ca2..56345befd0 100644
> --- a/hw/mem/Makefile.objs
> +++ b/hw/mem/Makefile.objs
> @@ -1,3 +1,3 @@
>  common-obj-$(CONFIG_DIMM) += pc-dimm.o
> -common-obj-$(CONFIG_MEM_DEVICE) += memory-device.o
> +common-obj-y += memory-device.o
>  common-obj-$(CONFIG_NVDIMM) += nvdimm.o
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>


Re: [PATCH] memory-device: simplify Makefile.objs conditions
Posted by Philippe Mathieu-Daudé 6 years ago
On 10/21/19 7:11 PM, Paolo Bonzini wrote:
> hw/mem/ is only included if CONFIG_MEM_DEVICE is true, so we need not
> specify the condition again in hw/mem/Makefile.objs.

Yes, cleaner.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   hw/mem/Makefile.objs | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/mem/Makefile.objs b/hw/mem/Makefile.objs
> index 3e2f7c5ca2..56345befd0 100644
> --- a/hw/mem/Makefile.objs
> +++ b/hw/mem/Makefile.objs
> @@ -1,3 +1,3 @@
>   common-obj-$(CONFIG_DIMM) += pc-dimm.o
> -common-obj-$(CONFIG_MEM_DEVICE) += memory-device.o
> +common-obj-y += memory-device.o
>   common-obj-$(CONFIG_NVDIMM) += nvdimm.o
>