vhost-vdpa: Make vhost_vdpa_get_device_id() static
PATCH 1/1 vhost-vdpa: Make vhost_vdpa_get_device_id() static
As it's only used inside hw/virtio/vhost-vdpa.c.
Signed-off-by Zenghui Yu <[email protected]>
--- hw/virtio/vhost-vdpa.c | 4 ++-- include/hw/virtio/vhost-vdpa.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)
hw/virtio/vhost-vdpa.c +2 -2
@@ -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);
include/hw/virtio/vhost-vdpa.h +0 -2
@@ -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
Signature · 1 line
2.19.1
Quoted 7 lines · Zenghui Yu
As it's only used inside
hw/virtio/vhost-vdpa.c.Signed-off-by Zenghui Yu <[email protected]>---
hw/virtio/vhost-vdpa.c| 4 ++--include/hw/virtio/vhost-vdpa.h| 2 --2 files changed, 2 insertions(+), 4 deletions(-)
Reviewed-by Stefano Garzarella <[email protected]>
Quoted 31 lines
hw/virtio/vhost-vdpa.c +2
-2@@ -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);include/hw/virtio/vhost-vdpa.h +0
-2@@ -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 Signature · 1 line
2.19.1
Quoted 7 lines · Zenghui Yu
As it's only used inside
hw/virtio/vhost-vdpa.c.Signed-off-by Zenghui Yu <[email protected]>--- hw/virtio/vhost-vdpa.c | 4 ++-- include/hw/virtio/vhost-vdpa.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)
Reviewed-by Philippe Mathieu-Daudé <[email protected]>