Skip to contentSkip to conversation

virtio-mem: Fix build error due to improper use 'select'

PATCH In review Weilong Chen 4 participants 4 messages Jun 19, 2020 virtio core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio-mem: Fix build error due to improper use 'select'

As noted in:
https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
"select should be used with care. select will force a symbol to a value without visiting the dependencies."
Config VIRTIO_MEM should not select CONTIG_ALLOC directly. Otherwise it will cause an error:
https://bugzilla.kernel.org/show_bug.cgi?id=208245

---
 drivers/virtio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/Kconfig +1 -1
index 5809e5f5b157..5c92e4a50882 100644
@@ -85,7 +85,7 @@ config VIRTIO_MEM
 	depends on VIRTIO
 	depends on MEMORY_HOTPLUG_SPARSE
 	depends on MEMORY_HOTREMOVE
-	select CONTIG_ALLOC
+	depends on CONTIG_ALLOC
 	help
 	 This driver provides access to virtio-mem paravirtualized memory
 	 devices, allowing to hotplug and hotunplug memory.
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines · Weilong Chen

As noted in:
https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
"select should be used with care. select will force a symbol to a value without visiting the dependencies."
Config VIRTIO_MEM should not select CONTIG_ALLOC directly. Otherwise it will cause an error:
https://bugzilla.kernel.org/show_bug.cgi?id=208245

---
  drivers/virtio/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/Kconfig +0 -0
index 5809e5f5b157..5c92e4a50882 100644

drivers/virtio/Kconfig config VIRTIO_MEM · line 91

Quoted 8 lines
drivers/virtio/Kconfig +1 -1
@@ -85,7 +85,7 @@ config VIRTIO_MEM
  	depends on VIRTIO
  	depends on MEMORY_HOTPLUG_SPARSE
  	depends on MEMORY_HOTREMOVE
-	select CONTIG_ALLOC
+	depends on CONTIG_ALLOC
  	help
  	 This driver provides access to virtio-mem paravirtualized memory
  	 devices, allowing to hotplug and hotunplug memory.

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#2 lore raw
In reply to Weilong Chen
Quoted 9 lines · Weilong Chen

As noted in:
https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
"select should be used with care. select will force a symbol to a value without visiting the dependencies."
Config VIRTIO_MEM should not select CONTIG_ALLOC directly. Otherwise it will cause an error:
https://bugzilla.kernel.org/show_bug.cgi?id=208245

Cc virtio mem maintainer:
M: David Hildenbrand <[email protected]>

Quoted 19 lines
---
 drivers/virtio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/Kconfig +1 -1
index 5809e5f5b157..5c92e4a50882 100644
@@ -85,7 +85,7 @@ config VIRTIO_MEM
 	depends on VIRTIO
 	depends on MEMORY_HOTPLUG_SPARSE
 	depends on MEMORY_HOTREMOVE
-	select CONTIG_ALLOC
+	depends on CONTIG_ALLOC
 	help
 	 This driver provides access to virtio-mem paravirtualized memory
 	 devices, allowing to hotplug and hotunplug memory.
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#3 lore raw
In reply to Weilong Chen
Quoted 4 lines · Weilong Chen

As noted in:
https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
"select should be used with care. select will force a symbol to a value without visiting the dependencies."

Right, rings a bell.

Quoted 3 lines

Config VIRTIO_MEM should not select CONTIG_ALLOC directly. Otherwise it will cause an error:
https://bugzilla.kernel.org/show_bug.cgi?id=208245

Thanks!

Quoted 20 lines
---
 drivers/virtio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/virtio/Kconfig +1 -1
index 5809e5f5b157..5c92e4a50882 100644
@@ -85,7 +85,7 @@ config VIRTIO_MEM
 	depends on VIRTIO
 	depends on MEMORY_HOTPLUG_SPARSE
 	depends on MEMORY_HOTREMOVE
-	select CONTIG_ALLOC
+	depends on CONTIG_ALLOC
 	help
 	 This driver provides access to virtio-mem paravirtualized memory
 	 devices, allowing to hotplug and hotunplug memory.
Signature · 3 lines
Thanks,

David / dhildenb