qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vhost-vdpa: Make vhost_vdpa_get_device_id() static
@ 2021-04-13 13:37 Zenghui Yu
  2021-04-14  9:08 ` Stefano Garzarella
  2021-04-14 10:12 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Zenghui Yu @ 2021-04-13 13:37 UTC (permalink / raw)
  To: qemu-devel, mst; +Cc: Zenghui Yu, wanghaibin.wang, jasowang, lulu

As it's only used inside hw/virtio/vhost-vdpa.c.

Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
---
 hw/virtio/vhost-vdpa.c         | 4 ++--
 include/hw/virtio/vhost-vdpa.h | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
index 01d2101d09..8f2fb9f10b 100644
--- a/hw/virtio/vhost-vdpa.c
+++ b/hw/virtio/vhost-vdpa.c
@@ -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);
diff --git a/include/hw/virtio/vhost-vdpa.h b/include/hw/virtio/vhost-vdpa.h
index 9b81a409da..28ca65018e 100644
--- a/include/hw/virtio/vhost-vdpa.h
+++ b/include/hw/virtio/vhost-vdpa.h
@@ -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
-- 
2.19.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vhost-vdpa: Make vhost_vdpa_get_device_id() static
  2021-04-13 13:37 [PATCH] vhost-vdpa: Make vhost_vdpa_get_device_id() static Zenghui Yu
@ 2021-04-14  9:08 ` Stefano Garzarella
  2021-04-14 10:12 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Stefano Garzarella @ 2021-04-14  9:08 UTC (permalink / raw)
  To: Zenghui Yu; +Cc: wanghaibin.wang, jasowang, qemu-devel, lulu, mst

On Tue, Apr 13, 2021 at 09:37:37PM +0800, Zenghui Yu wrote:
>As it's only used inside hw/virtio/vhost-vdpa.c.
>
>Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
>---
> hw/virtio/vhost-vdpa.c         | 4 ++--
> include/hw/virtio/vhost-vdpa.h | 2 --
> 2 files changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

>
>diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
>index 01d2101d09..8f2fb9f10b 100644
>--- a/hw/virtio/vhost-vdpa.c
>+++ b/hw/virtio/vhost-vdpa.c
>@@ -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);
>diff --git a/include/hw/virtio/vhost-vdpa.h b/include/hw/virtio/vhost-vdpa.h
>index 9b81a409da..28ca65018e 100644
>--- a/include/hw/virtio/vhost-vdpa.h
>+++ b/include/hw/virtio/vhost-vdpa.h
>@@ -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
>-- 
>2.19.1
>
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vhost-vdpa: Make vhost_vdpa_get_device_id() static
  2021-04-13 13:37 [PATCH] vhost-vdpa: Make vhost_vdpa_get_device_id() static Zenghui Yu
  2021-04-14  9:08 ` Stefano Garzarella
@ 2021-04-14 10:12 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-04-14 10:12 UTC (permalink / raw)
  To: Zenghui Yu, qemu-devel, mst; +Cc: wanghaibin.wang, jasowang, lulu

On 4/13/21 3:37 PM, Zenghui Yu wrote:
> As it's only used inside hw/virtio/vhost-vdpa.c.
> 
> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
> ---
>  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é <philmd@redhat.com>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-14 10:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 13:37 [PATCH] vhost-vdpa: Make vhost_vdpa_get_device_id() static Zenghui Yu
2021-04-14  9:08 ` Stefano Garzarella
2021-04-14 10:12 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).