[bug report] net/mlx5: E-Switch, Add control for inline mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Roi Dayan,

The patch bffaa916588e: "net/mlx5: E-Switch, Add control for inline
mode" from Nov 22, 2016, leads to the following static checker
warning:

	drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:950 mlx5_eswitch_inline_mode_get()
	error: uninitialized symbol 'prev_mlx5_mode'.

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
   932  int mlx5_eswitch_inline_mode_get(struct mlx5_eswitch *esw, int nvfs, u8 *mode)
   933  {
   934          struct mlx5_core_dev *dev = esw->dev;
   935          int vport;
   936          u8 prev_mlx5_mode, mlx5_mode = MLX5_INLINE_MODE_L2;
                   ^^^^^^^^^^^^^^
   937  
   938          if (!MLX5_CAP_GEN(dev, vport_group_manager))
   939                  return -EOPNOTSUPP;
   940  
   941          if (esw->mode == SRIOV_NONE)
   942                  return -EOPNOTSUPP;
   943  
   944          if (MLX5_CAP_ETH(dev, wqe_inline_mode) !=
   945              MLX5_CAP_INLINE_MODE_VPORT_CONTEXT)
   946                  return -EOPNOTSUPP;
   947  
   948          for (vport = 1; vport <= nvfs; vport++) {
   949                  mlx5_query_nic_vport_min_inline(dev, vport, &mlx5_mode);
   950                  if (vport > 1 && prev_mlx5_mode != mlx5_mode)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
No idea what prev_mlx5_mode is supposed to be for.

   951                          return -EINVAL;
   952                  prev_mlx5_mode = mlx5_mode;
   953          }
   954  
   955          *mode = mlx5_mode;
   956          return 0;
   957  }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux