Skip to content

Commit

Permalink
net/mlx4_core: Removed unnecessary bit operation condition
Browse files Browse the repository at this point in the history
Fix the "warn: suspicious bitop condition" made by the smatch semantic
checker on:
drivers/net/ethernet/mellanox/mlx4/main.c:509 mlx4_slave_cap()

Signed-off-by: Eyal Perry <eyalpe@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eyal Perry authored and David S. Miller committed May 14, 2014
1 parent c05a116 commit 483e013
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/net/ethernet/mellanox/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ module_param(enable_64b_cqe_eqe, bool, 0444);
MODULE_PARM_DESC(enable_64b_cqe_eqe,
"Enable 64 byte CQEs/EQEs when the FW supports this (default: True)");

#define HCA_GLOBAL_CAP_MASK 0

#define PF_CONTEXT_BEHAVIOUR_MASK MLX4_FUNC_CAP_64B_EQE_CQE

static char mlx4_version[] =
Expand Down Expand Up @@ -582,9 +580,10 @@ static int mlx4_slave_cap(struct mlx4_dev *dev)
return err;
}

/*fail if the hca has an unknown capability */
if ((hca_param.global_caps | HCA_GLOBAL_CAP_MASK) !=
HCA_GLOBAL_CAP_MASK) {
/* fail if the hca has an unknown global capability
* at this time global_caps should be always zeroed
*/
if (hca_param.global_caps) {
mlx4_err(dev, "Unknown hca global capabilities\n");
return -ENOSYS;
}
Expand Down

0 comments on commit 483e013

Please sign in to comment.