DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx4: remove useless assignment
@ 2020-06-24 13:31 Michael Baum
  2020-06-29  8:44 ` Raslan Darawsheh
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Baum @ 2020-06-24 13:31 UTC (permalink / raw)
  To: dev; +Cc: matan, viacheslavo

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@mellanox.com>
Acked-by: Matan Azrad <matan@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


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH] net/mlx4: remove useless assignment
@ 2020-06-24 13:44 Michael Baum
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Baum @ 2020-06-24 13:44 UTC (permalink / raw)
  To: dev; +Cc: matan, viacheslavo

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@mellanox.com>
Acked-by: Matan Azrad <matan@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-29  8:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 13:31 [dpdk-dev] [PATCH] net/mlx4: remove useless assignment Michael Baum
2020-06-29  8:44 ` Raslan Darawsheh
2020-06-24 13:44 Michael Baum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).