From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 041ECA0562; Tue, 31 Mar 2020 12:25:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 872D51BFC1; Tue, 31 Mar 2020 12:25:50 +0200 (CEST) Received: from huawei.com (szxga04-in.huawei.com [45.249.212.190]) by dpdk.org (Postfix) with ESMTP id 8D2312C6D for ; Tue, 31 Mar 2020 12:25:49 +0200 (CEST) Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9EA91AF38EEA92596718; Tue, 31 Mar 2020 18:24:38 +0800 (CST) Received: from localhost (10.173.251.152) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.487.0; Tue, 31 Mar 2020 18:24:30 +0800 From: wangyunjian To: CC: , , , , , Yunjian Wang Date: Tue, 31 Mar 2020 18:24:29 +0800 Message-ID: <1585650269-11556-1-git-send-email-wangyunjian@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.173.251.152] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] net/mlx5: remove unnecessary NULL check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Yunjian Wang This NULL check is unnecessary, container_of is never NULL. Signed-off-by: Yunjian Wang --- 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