Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 165cb465 authored by Roland Dreier's avatar Roland Dreier
Browse files

mlx4_core: Move handling of MLX4_QP_ST_MLX to proper switch statement



The handling of MLX4_QP_ST_MLX in verify_qp_parameters() was
accidentally put inside the inner switch statement (that handles which
transition of RC/UC/XRC QPs is happening).  Fix this by moving the case
to the outer switch statement.

The compiler pointed this out with:

    drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function 'verify_qp_parameters':
 >> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2875:3: warning: case value '7' not in enumerated type 'enum qp_transition' [-Wswitch]
       case MLX4_QP_ST_MLX:

Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Fixes: 99ec41d0 ("mlx4: Add infrastructure for selecting VFs to enable QP0 via MLX proxy QPs")
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 65fed8a8
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -2872,6 +2872,11 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
						return -EINVAL;
				}
			break;
		default:
			break;
		}
		break;

	case MLX4_QP_ST_MLX:
		qpn = vhcr->in_modifier & 0x7fffff;
		port = (qp_ctx->pri_path.sched_queue >> 6 & 1) + 1;
@@ -2890,11 +2895,6 @@ static int verify_qp_parameters(struct mlx4_dev *dev,
		break;
	}

		break;
	default:
		break;
	}

	return 0;
}