[dpdk-dev] [PATCH] net/mlx4: remove useless assignment

Raslan Darawsheh rasland at mellanox.com
Mon Jun 29 10:44:43 CEST 2020


Hi,

> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Michael Baum
> Sent: Wednesday, June 24, 2020 4:31 PM
> To: dev at dpdk.org
> Cc: Matan Azrad <matan at mellanox.com>; Slava Ovsiienko
> <viacheslavo at mellanox.com>
> Subject: [dpdk-dev] [PATCH] net/mlx4: remove useless assignment
> 
> The mlx4_ibv_device_to_pci_addr function defines a variable called ret
> inside a loop and uses it.
> 
> During the loop, the function assigns a value within the variable and
> breaks from the loop, so that this assigning has done nothing and is
> actually unnecessary.
> 
> Remove the unnecessary assigning.
> 
> Signed-off-by: Michael Baum <michaelba at mellanox.com>
> Acked-by: Matan Azrad <matan at mellanox.com>
> ---
>  drivers/net/mlx4/mlx4.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
> index ff270b4..1657ea3 100644
> --- a/drivers/net/mlx4/mlx4.c
> +++ b/drivers/net/mlx4/mlx4.c
> @@ -492,7 +492,6 @@ struct mlx4_conf {
>  			   &pci_addr->bus,
>  			   &pci_addr->devid,
>  			   &pci_addr->function) == 4) {
> -			ret = 0;
>  			break;
>  		}
>  	}
> --
> 1.8.3.1

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


More information about the dev mailing list