vhost-vdpa: Make vhost_vdpa_get_device_id() static
authorZenghui Yu <yuzenghui@huawei.com>
Tue, 13 Apr 2021 13:37:37 +0000 (21:37 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 14 May 2021 14:26:18 +0000 (10:26 -0400)
As it's only used inside hw/virtio/vhost-vdpa.c.

Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Message-Id: <20210413133737.1574-1-yuzenghui@huawei.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/vhost-vdpa.c
include/hw/virtio/vhost-vdpa.h

index 01d2101d0976fdd8e407a32ec9db1f6cf5e3d0e1..8f2fb9f10b2a0dc333ee73f2df51e4a9b68fea14 100644 (file)
@@ -371,8 +371,8 @@ static int vhost_vdpa_set_backend_cap(struct vhost_dev *dev)
     return 0;
 }
 
-int vhost_vdpa_get_device_id(struct vhost_dev *dev,
-                                   uint32_t *device_id)
+static int vhost_vdpa_get_device_id(struct vhost_dev *dev,
+                                    uint32_t *device_id)
 {
     int ret;
     ret = vhost_vdpa_call(dev, VHOST_VDPA_GET_DEVICE_ID, device_id);
index 9b81a409da89f1c67252aa2e816f088a24a7c367..28ca65018ed70e770e8dee1ec15c9c0016757991 100644 (file)
@@ -22,6 +22,4 @@ typedef struct vhost_vdpa {
 } VhostVDPA;
 
 extern AddressSpace address_space_memory;
-extern int vhost_vdpa_get_device_id(struct vhost_dev *dev,
-                                   uint32_t *device_id);
 #endif