[dpdk-dev] [PATCH] net/mlx5: remove unnecessary NULL check
wangyunjian
wangyunjian at huawei.com
Wed Nov 18 03:41:37 CET 2020
OK, please reject this patch.
Thanks,
Yunjian
> -----Original Message-----
> From: Suanming Mou [mailto:suanmingm at nvidia.com]
> Sent: Wednesday, November 18, 2020 10:16 AM
> To: wangyunjian <wangyunjian at huawei.com>; dev at dpdk.org
> Cc: matan at mellanox.com; shahafs at mellanox.com;
> viacheslavo at mellanox.com; Lilijun (Jerry) <jerry.lilijun at huawei.com>; xudingke
> <xudingke at huawei.com>
> Subject: Re: [dpdk-dev] [PATCH] net/mlx5: remove unnecessary NULL check
>
> 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 <wangyunjian at huawei.com>
> >
> > This NULL check is unnecessary, container_of is never NULL.
> >
> > Signed-off-by: Yunjian Wang <wangyunjian at 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);
> > }
>
More information about the dev
mailing list