[PATCH] RDMA/irdma: Fix warning in utils.c build

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

 



When defining CONFIG_INIT_STACK_ALL_ZERO a warning is emitted
due to this variable in the switch, moving it into the case 
solves the problem.

Signed-off-by: Jack Vogel <jack.vogel@xxxxxxxxxx>
---
 drivers/infiniband/hw/irdma/utils.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/irdma/utils.c b/drivers/infiniband/hw/irdma/utils.c
index 445e69e86409..fe6dd59fcf5b 100644
--- a/drivers/infiniband/hw/irdma/utils.c
+++ b/drivers/infiniband/hw/irdma/utils.c
@@ -1218,12 +1218,11 @@ int irdma_hw_modify_qp(struct irdma_device *iwdev, struct irdma_qp *iwqp,
 			return status;
 
 		switch (m_info->next_iwarp_state) {
-			struct irdma_gen_ae_info ae_info;
-
 		case IRDMA_QP_STATE_RTS:
 		case IRDMA_QP_STATE_IDLE:
 		case IRDMA_QP_STATE_TERMINATE:
-		case IRDMA_QP_STATE_CLOSING:
+		case IRDMA_QP_STATE_CLOSING: {
+			struct irdma_gen_ae_info ae_info;
 			if (info->curr_iwarp_state == IRDMA_QP_STATE_IDLE)
 				irdma_send_reset(iwqp->cm_node);
 			else
@@ -1250,7 +1249,7 @@ int irdma_hw_modify_qp(struct irdma_device *iwdev, struct irdma_qp *iwqp,
 				irdma_handle_cqp_op(rf, cqp_request);
 				irdma_put_cqp_request(&rf->cqp, cqp_request);
 			}
-			break;
+		} break;
 		case IRDMA_QP_STATE_ERROR:
 		default:
 			break;
-- 
2.39.1




[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