diff mbox series

[v3,43/46] net: remove qemu_check_nic_model()

Message ID 20240108204909.564514-44-dwmw2@infradead.org
State New
Headers show
Series Rework matching of network devices to -nic options | expand

Commit Message

David Woodhouse Jan. 8, 2024, 8:27 p.m. UTC
From: David Woodhouse <dwmw@amazon.co.uk>

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
 include/net/net.h |  1 -
 net/net.c         | 13 -------------
 2 files changed, 14 deletions(-)

Comments

Thomas Huth Jan. 26, 2024, 4:01 p.m. UTC | #1
On 08/01/2024 21.27, David Woodhouse wrote:
> From: David Woodhouse <dwmw@amazon.co.uk>

Please add a short patch description à la "All callers have been converted 
in the previous patches, so this is not required anymore".

With that:
Reviewed-by: Thomas Huth <thuth@redhat.com>


> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
> ---
>   include/net/net.h |  1 -
>   net/net.c         | 13 -------------
>   2 files changed, 14 deletions(-)
> 
> diff --git a/include/net/net.h b/include/net/net.h
> index 31e63d1f0d..1be8b40074 100644
> --- a/include/net/net.h
> +++ b/include/net/net.h
> @@ -204,7 +204,6 @@ int qemu_set_vnet_le(NetClientState *nc, bool is_le);
>   int qemu_set_vnet_be(NetClientState *nc, bool is_be);
>   void qemu_macaddr_default_if_unset(MACAddr *macaddr);
>   int qemu_show_nic_models(const char *arg, const char *const *models);
> -void qemu_check_nic_model(NICInfo *nd, const char *model);
>   int qemu_find_nic_model(NICInfo *nd, const char * const *models,
>                           const char *default_model);
>   NICInfo *qemu_find_nic_info(const char *typename, bool match_default,
> diff --git a/net/net.c b/net/net.c
> index 4651b3f443..ffd4b42d5a 100644
> --- a/net/net.c
> +++ b/net/net.c
> @@ -992,19 +992,6 @@ int qemu_show_nic_models(const char *arg, const char *const *models)
>       return 1;
>   }
>   
> -void qemu_check_nic_model(NICInfo *nd, const char *model)
> -{
> -    const char *models[2];
> -
> -    models[0] = model;
> -    models[1] = NULL;
> -
> -    if (qemu_show_nic_models(nd->model, models))
> -        exit(0);
> -    if (qemu_find_nic_model(nd, models, model) < 0)
> -        exit(1);
> -}
> -
>   int qemu_find_nic_model(NICInfo *nd, const char * const *models,
>                           const char *default_model)
>   {
diff mbox series

Patch

diff --git a/include/net/net.h b/include/net/net.h
index 31e63d1f0d..1be8b40074 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -204,7 +204,6 @@  int qemu_set_vnet_le(NetClientState *nc, bool is_le);
 int qemu_set_vnet_be(NetClientState *nc, bool is_be);
 void qemu_macaddr_default_if_unset(MACAddr *macaddr);
 int qemu_show_nic_models(const char *arg, const char *const *models);
-void qemu_check_nic_model(NICInfo *nd, const char *model);
 int qemu_find_nic_model(NICInfo *nd, const char * const *models,
                         const char *default_model);
 NICInfo *qemu_find_nic_info(const char *typename, bool match_default,
diff --git a/net/net.c b/net/net.c
index 4651b3f443..ffd4b42d5a 100644
--- a/net/net.c
+++ b/net/net.c
@@ -992,19 +992,6 @@  int qemu_show_nic_models(const char *arg, const char *const *models)
     return 1;
 }
 
-void qemu_check_nic_model(NICInfo *nd, const char *model)
-{
-    const char *models[2];
-
-    models[0] = model;
-    models[1] = NULL;
-
-    if (qemu_show_nic_models(nd->model, models))
-        exit(0);
-    if (qemu_find_nic_model(nd, models, model) < 0)
-        exit(1);
-}
-
 int qemu_find_nic_model(NICInfo *nd, const char * const *models,
                         const char *default_model)
 {