diff mbox series

[v2,4/8] virtio: remove the virtio_feature_get_config_size helper

Message ID 20220826143248.580939-5-d-tatianin@yandex-team.ru (mailing list archive)
State New, archived
Headers show
Series vhost-user-blk: dynamically resize config space based on features | expand

Commit Message

Daniil Tatianin Aug. 26, 2022, 2:32 p.m. UTC
This has no more users and is superseded by virtio_get_config_size.

Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
---
 hw/virtio/virtio.c         | 15 ---------------
 include/hw/virtio/virtio.h |  3 ---
 2 files changed, 18 deletions(-)

Comments

Raphael Norwitz Sept. 2, 2022, 5:55 p.m. UTC | #1
On Fri, Aug 26, 2022 at 05:32:44PM +0300, Daniil Tatianin wrote:
> This has no more users and is superseded by virtio_get_config_size.
> 
> Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>

Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>

> ---
>  hw/virtio/virtio.c         | 15 ---------------
>  include/hw/virtio/virtio.h |  3 ---
>  2 files changed, 18 deletions(-)
> 
> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> index 8518382025..c0bf8dd6fd 100644
> --- a/hw/virtio/virtio.c
> +++ b/hw/virtio/virtio.c
> @@ -2999,21 +2999,6 @@ int virtio_set_features(VirtIODevice *vdev, uint64_t val)
>      return ret;
>  }
>  
> -size_t virtio_feature_get_config_size(const VirtIOFeature *feature_sizes,
> -                                      uint64_t host_features)
> -{
> -    size_t config_size = 0;
> -    int i;
> -
> -    for (i = 0; feature_sizes[i].flags != 0; i++) {
> -        if (host_features & feature_sizes[i].flags) {
> -            config_size = MAX(feature_sizes[i].end, config_size);
> -        }
> -    }
> -
> -    return config_size;
> -}
> -
>  size_t virtio_get_config_size(const VirtIOConfigSizeParams *params,
>                                uint64_t host_features)
>  {
> diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
> index 1991c58d9b..f3ff6710d5 100644
> --- a/include/hw/virtio/virtio.h
> +++ b/include/hw/virtio/virtio.h
> @@ -53,9 +53,6 @@ typedef struct VirtIOConfigSizeParams {
>  size_t virtio_get_config_size(const VirtIOConfigSizeParams *params,
>                                uint64_t host_features);
>  
> -size_t virtio_feature_get_config_size(const VirtIOFeature *features,
> -                                      uint64_t host_features);
> -
>  typedef struct VirtQueue VirtQueue;
>  
>  #define VIRTQUEUE_MAX_SIZE 1024
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 8518382025..c0bf8dd6fd 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -2999,21 +2999,6 @@  int virtio_set_features(VirtIODevice *vdev, uint64_t val)
     return ret;
 }
 
-size_t virtio_feature_get_config_size(const VirtIOFeature *feature_sizes,
-                                      uint64_t host_features)
-{
-    size_t config_size = 0;
-    int i;
-
-    for (i = 0; feature_sizes[i].flags != 0; i++) {
-        if (host_features & feature_sizes[i].flags) {
-            config_size = MAX(feature_sizes[i].end, config_size);
-        }
-    }
-
-    return config_size;
-}
-
 size_t virtio_get_config_size(const VirtIOConfigSizeParams *params,
                               uint64_t host_features)
 {
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 1991c58d9b..f3ff6710d5 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -53,9 +53,6 @@  typedef struct VirtIOConfigSizeParams {
 size_t virtio_get_config_size(const VirtIOConfigSizeParams *params,
                               uint64_t host_features);
 
-size_t virtio_feature_get_config_size(const VirtIOFeature *features,
-                                      uint64_t host_features);
-
 typedef struct VirtQueue VirtQueue;
 
 #define VIRTQUEUE_MAX_SIZE 1024