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 2F0C5A04E6; Wed, 18 Nov 2020 03:16:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1E25B58C4; Wed, 18 Nov 2020 03:16:16 +0100 (CET) Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by dpdk.org (Postfix) with ESMTP id 3A40D37B1 for ; Wed, 18 Nov 2020 03:16:14 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Tue, 17 Nov 2020 18:16:22 -0800 Received: from [172.27.8.82] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 18 Nov 2020 02:15:59 +0000 To: wangyunjian , CC: , , , , References: <1585650269-11556-1-git-send-email-wangyunjian@huawei.com> From: Suanming Mou Message-ID: <2b575415-7f73-d1d9-6b47-3008651b8c77@nvidia.com> Date: Wed, 18 Nov 2020 10:15:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <1585650269-11556-1-git-send-email-wangyunjian@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1605665782; bh=Y8txmPci+06TI884Ee97lWmsIAnBQX7Y8ZTbbEweQ7I=; h=Subject:To:CC:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding: Content-Language:X-Originating-IP:X-ClientProxiedBy; b=ce0pklthpsCX0A7UdXM5o6qjtFZNJimm7dVQrjrdA7HD9+LSWTolDQaN9+d7BYFS4 nud0itEGjZCIxK/AIfJiFijcslfHw3UzsW+iCKO6Mqyyxu3jplt6Up/tKqef0Gkp+D +6P8F9xqqqUK1BXXO0BxkZthdYZDaEK4R8YRGDwX8BngSzkLSVfuKkqs/QDce1xrvE jIpRoQ1ibLpshCWUjWdvtX5fTtBCDlyb8e+mqbyYRolxs/mPd6bV/P5ll2qxT6GVqn NBXle1DSAduI8K8jP/wCnKy8o877OWClDI2k879ZFcA28llnl3zRQCBo4FgUV7ORT1 Em+Xda1409TxA== Subject: Re: [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" Hi Yunjian, As the code changed, I think this patch is not needed anymore. Thanks, SuanmingMou On 3/31/2020 6:24 PM, wangyunjian wrote: > 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); > }