DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] net/mlx5: remove unnecessary NULL check
@ 2020-03-31 10:24 wangyunjian
  2020-03-31 10:53 ` Matan Azrad
  2020-11-18  2:15 ` Suanming Mou
  0 siblings, 2 replies; 5+ messages in thread
From: wangyunjian @ 2020-03-31 10:24 UTC (permalink / raw)
  To: dev; +Cc: matan, shahafs, viacheslavo, jerry.lilijun, xudingke, Yunjian Wang

From: Yunjian Wang <wangyunjian@huawei.com>

This NULL check is unnecessary, container_of is never NULL.

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 drivers/net/mlx5/mlx5.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 94aaa6057..2e4edb123 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -747,7 +747,6 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv)
 	if (pos) {
 		tbl_data = container_of(pos, struct mlx5_flow_tbl_data_entry,
 					entry);
-		MLX5_ASSERT(tbl_data);
 		mlx5_hlist_remove(sh->flow_tbls, pos);
 		rte_free(tbl_data);
 	}
@@ -756,7 +755,6 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv)
 	if (pos) {
 		tbl_data = container_of(pos, struct mlx5_flow_tbl_data_entry,
 					entry);
-		MLX5_ASSERT(tbl_data);
 		mlx5_hlist_remove(sh->flow_tbls, pos);
 		rte_free(tbl_data);
 	}
@@ -766,7 +764,6 @@ mlx5_free_table_hash_list(struct mlx5_priv *priv)
 	if (pos) {
 		tbl_data = container_of(pos, struct mlx5_flow_tbl_data_entry,
 					entry);
-		MLX5_ASSERT(tbl_data);
 		mlx5_hlist_remove(sh->flow_tbls, pos);
 		rte_free(tbl_data);
 	}
-- 
2.19.1



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

end of thread, other threads:[~2020-11-18  2:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 10:24 [dpdk-dev] [PATCH] net/mlx5: remove unnecessary NULL check wangyunjian
2020-03-31 10:53 ` Matan Azrad
2020-04-01 11:13   ` wangyunjian
2020-11-18  2:15 ` Suanming Mou
2020-11-18  2:41   ` wangyunjian

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