public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [bug report] net/mlx5: E-Switch, Consider SF ports of host PF
@ 2021-04-30  6:02 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-04-30  6:02 UTC (permalink / raw)
  To: parav; +Cc: linux-rdma

Hello Parav Pandit,

The patch 87bd418ea751: "net/mlx5: E-Switch, Consider SF ports of
host PF" from Mar 2, 2021, leads to the following static checker
warning:

	drivers/net/ethernet/mellanox/mlx5/core/eswitch.c:1571 mlx5_query_hca_cap_host_pf()
	warn: odd binop '0x0 & 0x1'

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
  1569  static int mlx5_query_hca_cap_host_pf(struct mlx5_core_dev *dev, void *out)
  1570  {
  1571          u16 opmod = (MLX5_CAP_GENERAL << 1) | (HCA_CAP_OPMOD_GET_MAX & 0x01);
                                                       ^^^^^^^^^^^^^^^^^^^^^
HCA_CAP_OPMOD_GET_MAX is zero.

  1572          u8 in[MLX5_ST_SZ_BYTES(query_hca_cap_in)] = {};
  1573  
  1574          MLX5_SET(query_hca_cap_in, in, opcode, MLX5_CMD_OP_QUERY_HCA_CAP);
  1575          MLX5_SET(query_hca_cap_in, in, op_mod, opmod);
  1576          MLX5_SET(query_hca_cap_in, in, function_id, MLX5_VPORT_PF);
  1577          MLX5_SET(query_hca_cap_in, in, other_function, true);
  1578          return mlx5_cmd_exec_inout(dev, query_hca_cap, in, out);
  1579  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-30  6:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-30  6:02 [bug report] net/mlx5: E-Switch, Consider SF ports of host PF Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox