[1/4] net/vhost: remove an unused member
diff mbox series

Message ID 20200108232209.5460-2-oda@valinux.co.jp
State Superseded
Delegated to: Maxime Coquelin
Headers show
Series
  • [1/4] net/vhost: remove an unused member
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Performance fail Performance Testing issues
ci/checkpatch success coding style OK

Commit Message

Itsuro Oda Jan. 8, 2020, 11:22 p.m. UTC
remove an unused member from pmd_internal.

Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
---
 drivers/net/vhost/rte_eth_vhost.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Maxime Coquelin Feb. 4, 2020, 5:56 p.m. UTC | #1
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 <oda@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.coquelin@redhat.com>

Thanks,
Maxime

Patch
diff mbox series

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);