diff mbox series

[rdma-next] RDMA/mlx5: Remove DEBUG ODP code

Message ID 20190731115627.5433-1-leon@kernel.org (mailing list archive)
State Mainlined
Commit d129e3f42266a12b821868fc8c2407a4d80f0b18
Headers show
Series [rdma-next] RDMA/mlx5: Remove DEBUG ODP code | expand

Commit Message

Leon Romanovsky July 31, 2019, 11:56 a.m. UTC
From: Leon Romanovsky <leonro@mellanox.com>

Delete DEBU ODP dead code which is leftover from development
stage and doesn't need to be part of the upstream kernel.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/odp.c | 24 ------------------------
 1 file changed, 24 deletions(-)

Comments

Leon Romanovsky July 31, 2019, 2:08 p.m. UTC | #1
On Wed, Jul 31, 2019 at 02:56:27PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
>
> Delete DEBU ODP dead code which is leftover from development

DEBU -> DEBUG

> stage and doesn't need to be part of the upstream kernel.
>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
>  drivers/infiniband/hw/mlx5/odp.c | 24 ------------------------
>  1 file changed, 24 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c
> index 74310d885a90..6f1de5edbe8e 100644
> --- a/drivers/infiniband/hw/mlx5/odp.c
> +++ b/drivers/infiniband/hw/mlx5/odp.c
> @@ -1033,9 +1033,6 @@ static int mlx5_ib_mr_initiator_pfault_handler(
>  	u32 transport_caps;
>  	struct mlx5_base_av *av;
>  	unsigned ds, opcode;
> -#if defined(DEBUG)
> -	u32 ctrl_wqe_index, ctrl_qpn;
> -#endif
>  	u32 qpn = qp->trans_qp.base.mqp.qpn;
>
>  	ds = be32_to_cpu(ctrl->qpn_ds) & MLX5_WQE_CTRL_DS_MASK;
> @@ -1051,27 +1048,6 @@ static int mlx5_ib_mr_initiator_pfault_handler(
>  		return -EFAULT;
>  	}
>
> -#if defined(DEBUG)
> -	ctrl_wqe_index = (be32_to_cpu(ctrl->opmod_idx_opcode) &
> -			MLX5_WQE_CTRL_WQE_INDEX_MASK) >>
> -			MLX5_WQE_CTRL_WQE_INDEX_SHIFT;
> -	if (wqe_index != ctrl_wqe_index) {
> -		mlx5_ib_err(dev, "Got WQE with invalid wqe_index. wqe_index=0x%x, qpn=0x%x ctrl->wqe_index=0x%x\n",
> -			    wqe_index, qpn,
> -			    ctrl_wqe_index);
> -		return -EFAULT;
> -	}
> -
> -	ctrl_qpn = (be32_to_cpu(ctrl->qpn_ds) & MLX5_WQE_CTRL_QPN_MASK) >>
> -		MLX5_WQE_CTRL_QPN_SHIFT;
> -	if (qpn != ctrl_qpn) {
> -		mlx5_ib_err(dev, "Got WQE with incorrect QP number. wqe_index=0x%x, qpn=0x%x ctrl->qpn=0x%x\n",
> -			    wqe_index, qpn,
> -			    ctrl_qpn);
> -		return -EFAULT;
> -	}
> -#endif /* DEBUG */
> -
>  	*wqe_end = *wqe + ds * MLX5_WQE_DS_UNITS;
>  	*wqe += sizeof(*ctrl);
>
> --
> 2.20.1
>
Doug Ledford July 31, 2019, 7:02 p.m. UTC | #2
On Wed, 2019-07-31 at 14:08 +0000, Leon Romanovsky wrote:
> On Wed, Jul 31, 2019 at 02:56:27PM +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@mellanox.com>
> > 
> > Delete DEBU ODP dead code which is leftover from development
> 
> DEBU -> DEBUG
> 
> > stage and doesn't need to be part of the upstream kernel.
> > 
> > Signed-off-by: Leon Romanovsky <leonro@mellanox.com>

Patch, with spelling issue in commit message fixed, applied to for-next, 
thanks.
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c
index 74310d885a90..6f1de5edbe8e 100644
--- a/drivers/infiniband/hw/mlx5/odp.c
+++ b/drivers/infiniband/hw/mlx5/odp.c
@@ -1033,9 +1033,6 @@  static int mlx5_ib_mr_initiator_pfault_handler(
 	u32 transport_caps;
 	struct mlx5_base_av *av;
 	unsigned ds, opcode;
-#if defined(DEBUG)
-	u32 ctrl_wqe_index, ctrl_qpn;
-#endif
 	u32 qpn = qp->trans_qp.base.mqp.qpn;
 
 	ds = be32_to_cpu(ctrl->qpn_ds) & MLX5_WQE_CTRL_DS_MASK;
@@ -1051,27 +1048,6 @@  static int mlx5_ib_mr_initiator_pfault_handler(
 		return -EFAULT;
 	}
 
-#if defined(DEBUG)
-	ctrl_wqe_index = (be32_to_cpu(ctrl->opmod_idx_opcode) &
-			MLX5_WQE_CTRL_WQE_INDEX_MASK) >>
-			MLX5_WQE_CTRL_WQE_INDEX_SHIFT;
-	if (wqe_index != ctrl_wqe_index) {
-		mlx5_ib_err(dev, "Got WQE with invalid wqe_index. wqe_index=0x%x, qpn=0x%x ctrl->wqe_index=0x%x\n",
-			    wqe_index, qpn,
-			    ctrl_wqe_index);
-		return -EFAULT;
-	}
-
-	ctrl_qpn = (be32_to_cpu(ctrl->qpn_ds) & MLX5_WQE_CTRL_QPN_MASK) >>
-		MLX5_WQE_CTRL_QPN_SHIFT;
-	if (qpn != ctrl_qpn) {
-		mlx5_ib_err(dev, "Got WQE with incorrect QP number. wqe_index=0x%x, qpn=0x%x ctrl->qpn=0x%x\n",
-			    wqe_index, qpn,
-			    ctrl_qpn);
-		return -EFAULT;
-	}
-#endif /* DEBUG */
-
 	*wqe_end = *wqe + ds * MLX5_WQE_DS_UNITS;
 	*wqe += sizeof(*ctrl);