vdpa-sim: depend on HAS_DMA
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 5 Apr 2020 08:11:29 +0000 (04:11 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 16 Apr 2020 22:31:01 +0000 (18:31 -0400)
set_dma_ops isn't available on all architectures:

        make ARCH=um
...

   drivers/vdpa/vdpa_sim/vdpa_sim.c: In function 'vdpasim_create':
>> drivers/vdpa/vdpa_sim/vdpa_sim.c:324:2: error: implicit declaration of function 'set_dma_ops'; did you mean 'set_groups'?
+[-Werror=implicit-function-declaration]
     set_dma_ops(dev, &vdpasim_dma_ops);
     ^~~~~~~~~~~
     set_groups

Disable vdpa-sim on architectures where it isn't.

Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/Kconfig

index 7db1460..42c32b7 100644 (file)
@@ -14,7 +14,7 @@ if VDPA_MENU
 
 config VDPA_SIM
        tristate "vDPA device simulator"
-       depends on RUNTIME_TESTING_MENU
+       depends on RUNTIME_TESTING_MENU && HAS_DMA
        select VDPA
        select VHOST_RING
        default n