diff mbox

[2/5] mlx5: Remove a set-but-not-used variable

Message ID f1351e2c-915d-9883-838b-d3c50f27da17@sandisk.com (mailing list archive)
State Accepted
Headers show

Commit Message

Bart Van Assche Dec. 6, 2016, 1:18 a.m. UTC
This has been detected by building the mlx5 driver with W=1.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Eli Cohen <eli@mellanox.com>
---
 drivers/infiniband/hw/mlx5/qp.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Leon Romanovsky Dec. 6, 2016, 2:24 p.m. UTC | #1
On Mon, Dec 05, 2016 at 05:18:27PM -0800, Bart Van Assche wrote:
> This has been detected by building the mlx5 driver with W=1.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Cc: Eli Cohen <eli@mellanox.com>

Thanks,
Fixes: 1a412fb1caa2 ('net/mlx5: Fixes: 1a412fb1caa2 (IB/mlx5: Modify QP commands via mlx5 ifc')
Acked-by: Leon Romanovsky <leonro@mellanox.com>


> ---
>  drivers/infiniband/hw/mlx5/qp.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
> index d1e921816bfe..b2c6c13d44ac 100644
> --- a/drivers/infiniband/hw/mlx5/qp.c
> +++ b/drivers/infiniband/hw/mlx5/qp.c
> @@ -2577,7 +2577,6 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp,
>  	struct mlx5_ib_port *mibport = NULL;
>  	enum mlx5_qp_state mlx5_cur, mlx5_new;
>  	enum mlx5_qp_optpar optpar;
> -	int sqd_event;
>  	int mlx5_st;
>  	int err;
>  	u16 op;
> @@ -2724,12 +2723,6 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp,
>  	if (qp->rq.wqe_cnt && cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT)
>  		context->db_rec_addr = cpu_to_be64(qp->db.dma);
>  
> -	if (cur_state == IB_QPS_RTS && new_state == IB_QPS_SQD	&&
> -	    attr_mask & IB_QP_EN_SQD_ASYNC_NOTIFY && attr->en_sqd_async_notify)
> -		sqd_event = 1;
> -	else
> -		sqd_event = 0;
> -
>  	if (cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT) {
>  		u8 port_num = (attr_mask & IB_QP_PORT ? attr->port_num :
>  			       qp->port) - 1;
> -- 
> 2.11.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Doug Ledford Dec. 14, 2016, 6:45 p.m. UTC | #2
On 12/6/2016 9:24 AM, Leon Romanovsky wrote:
> On Mon, Dec 05, 2016 at 05:18:27PM -0800, Bart Van Assche wrote:
>> This has been detected by building the mlx5 driver with W=1.
>>
>> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
>> Cc: Eli Cohen <eli@mellanox.com>
> 
> Thanks,
> Fixes: 1a412fb1caa2 ('net/mlx5: Fixes: 1a412fb1caa2 (IB/mlx5: Modify QP commands via mlx5 ifc')
> Acked-by: Leon Romanovsky <leonro@mellanox.com>

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index d1e921816bfe..b2c6c13d44ac 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -2577,7 +2577,6 @@  static int __mlx5_ib_modify_qp(struct ib_qp *ibqp,
 	struct mlx5_ib_port *mibport = NULL;
 	enum mlx5_qp_state mlx5_cur, mlx5_new;
 	enum mlx5_qp_optpar optpar;
-	int sqd_event;
 	int mlx5_st;
 	int err;
 	u16 op;
@@ -2724,12 +2723,6 @@  static int __mlx5_ib_modify_qp(struct ib_qp *ibqp,
 	if (qp->rq.wqe_cnt && cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT)
 		context->db_rec_addr = cpu_to_be64(qp->db.dma);
 
-	if (cur_state == IB_QPS_RTS && new_state == IB_QPS_SQD	&&
-	    attr_mask & IB_QP_EN_SQD_ASYNC_NOTIFY && attr->en_sqd_async_notify)
-		sqd_event = 1;
-	else
-		sqd_event = 0;
-
 	if (cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT) {
 		u8 port_num = (attr_mask & IB_QP_PORT ? attr->port_num :
 			       qp->port) - 1;