net/mlx5: Assign boolean values to a bool variable
authorJiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Mon, 25 Jan 2021 07:50:37 +0000 (15:50 +0800)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 11 Feb 2021 04:47:13 +0000 (20:47 -0800)
Fix the following coccicheck warnings:

./drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:575:2-14: WARNING:
Assignment of 0/1 to bool variable.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c

index 11b89a3a2ff578cb4b3d4756bda8b23608f391ca..66ad599bd4889e0272d1627a37a2a1eae4bbc1c8 100644 (file)
@@ -572,7 +572,7 @@ static void del_hw_fte(struct fs_node *node)
                        mlx5_core_warn(dev,
                                       "flow steering can't delete fte in index %d of flow group id %d\n",
                                       fte->index, fg->id);
-               node->active = 0;
+               node->active = false;
        }
 }