git: 834533b9c50e - main - mlx5: Remove unused variables.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Sat, 09 Apr 2022 00:27:46 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=834533b9c50e5943bd34801677bdb0fe52619ad5

commit 834533b9c50e5943bd34801677bdb0fe52619ad5
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-09 00:25:13 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-09 00:25:13 +0000

    mlx5: Remove unused variables.
    
    Reviewed by:    hselasky
    Differential Revision:  https://reviews.freebsd.org/D34827
---
 sys/dev/mlx5/mlx5_core/mlx5_eq.c  | 5 -----
 sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c | 9 ---------
 2 files changed, 14 deletions(-)

diff --git a/sys/dev/mlx5/mlx5_core/mlx5_eq.c b/sys/dev/mlx5/mlx5_core/mlx5_eq.c
index d51e97cd3e90..22b170179005 100644
--- a/sys/dev/mlx5/mlx5_core/mlx5_eq.c
+++ b/sys/dev/mlx5/mlx5_core/mlx5_eq.c
@@ -739,14 +739,9 @@ static void mlx5_port_general_notification_event(struct mlx5_core_dev *dev,
 						 struct mlx5_eqe *eqe)
 {
 	u8 port = (eqe->data.port.port >> 4) & 0xf;
-	u32 rqn;
-	struct mlx5_eqe_general_notification_event *general_event;
 
 	switch (eqe->sub_type) {
 	case MLX5_GEN_EVENT_SUBTYPE_DELAY_DROP_TIMEOUT:
-		general_event = &eqe->data.general_notifications;
-		rqn = be32_to_cpu(general_event->rq_user_index_delay_drop) &
-			  0xffffff;
 		break;
 	case MLX5_GEN_EVENT_SUBTYPE_PCI_POWER_CHANGE_EVENT:
 		mlx5_trigger_health_watchdog(dev);
diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c
index 8377ba388e6d..7d4b446d23d1 100644
--- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c
+++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_qp.c
@@ -2727,7 +2727,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;
@@ -2863,12 +2862,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;
@@ -3919,7 +3912,6 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
 	unsigned long flags;
 	unsigned idx;
 	int err = 0;
-	int inl = 0;
 	int num_sge;
 	void *seg;
 	int nreq;
@@ -4162,7 +4154,6 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr,
 				*bad_wr = wr;
 				goto out;
 			}
-			inl = 1;
 			size += sz;
 		} else {
 			dpseg = seg;