On 1/9/20 12:22 AM, Itsuro Oda wrote:
> remove an unused member from pmd_internal.

Please try to do a complete sentence:

This patch removes an unused...

> Signed-off-by: Itsuro Oda <o...@valinux.co.jp>
> ---
>  drivers/net/vhost/rte_eth_vhost.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/net/vhost/rte_eth_vhost.c 
> b/drivers/net/vhost/rte_eth_vhost.c
> index 46f01a7f4..d4e3485ce 100644
> --- a/drivers/net/vhost/rte_eth_vhost.c
> +++ b/drivers/net/vhost/rte_eth_vhost.c
> @@ -95,7 +95,6 @@ struct vhost_queue {
>  
>  struct pmd_internal {
>       rte_atomic32_t dev_attached;
> -     char *dev_name;
>       char *iface_name;
>       uint16_t max_queues;
>       int vid;
> @@ -1008,7 +1007,6 @@ eth_dev_close(struct rte_eth_dev *dev)
>               for (i = 0; i < dev->data->nb_tx_queues; i++)
>                       rte_free(dev->data->tx_queues[i]);
>  
> -     free(internal->dev_name);
>       free(internal->iface_name);
>       rte_free(internal);
>  
> @@ -1253,9 +1251,6 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char 
> *iface_name,
>        * - and point eth_dev structure to new eth_dev_data structure
>        */
>       internal = eth_dev->data->dev_private;
> -     internal->dev_name = strdup(name);
> -     if (internal->dev_name == NULL)
> -             goto error;
>       internal->iface_name = strdup(iface_name);
>       if (internal->iface_name == NULL)
>               goto error;
> @@ -1305,10 +1300,8 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char 
> *iface_name,
>       return data->port_id;
>  
>  error:
> -     if (internal) {
> +     if (internal)
>               free(internal->iface_name);
> -             free(internal->dev_name);
> -     }
>       rte_free(vring_state);
>       rte_eth_dev_release_port(eth_dev);
>       rte_free(list);
> 

Other than that, it looks good to me.
With the commit message fixed, and this patch moved to the end of the
series:

Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com>

Thanks,
Maxime

Reply via email to