Skip to contentSkip to conversation

IB/hfi1: Add missing break in switch statement

PATCH Applied Gustavo A. R. Silva 3 participants 4 messages Feb 21, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IB/hfi1: Add missing break in switch statement

Fix the following warning by adding a missing break:

drivers/infiniband/hw/hfi1/tid_rdma.c: In function ‘hfi1_tid_rdma_wqe_interlock’:
drivers/infiniband/hw/hfi1/tid_rdma.c:3251:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
switch (prev->wr.opcode) {
^~~~~~
drivers/infiniband/hw/hfi1/tid_rdma.c:3259:2: note: here
case IB_WR_RDMA_READ:
^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.

Fixes c6c231175ccd ("IB/hfi1: Add interlock between TID RDMA WRITE and other requests")
---
 drivers/infiniband/hw/hfi1/tid_rdma.c | 1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/hw/hfi1/tid_rdma.c +1 -0
index bc2ff83026f7..fdda33aca77f 100644
@@ -3256,6 +3256,7 @@ bool hfi1_tid_rdma_wqe_interlock(struct rvt_qp *qp, struct rvt_swqe *wqe)
 		default:
 			break;
 		}
+		break;
 	case IB_WR_RDMA_READ:
 		if (prev->wr.opcode != IB_WR_TID_RDMA_WRITE)
 			break;
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 49 lines

-----Original Message-----
From: Gustavo A. R. Silva [mailto:[email protected]]
Sent: Wednesday, February 20, 2019 8:03 PM
To: Wan, Kaike <[email protected]>; Marciniszyn, Mike <[email protected]>; Dalessandro, Dennis <[email protected]>; Doug Ledford <[email protected]>; Jason Gunthorpe <[email protected]>
Cc: [email protected]; [email protected]; Gustavo A. R. Silva <[email protected]>; Kees Cook <[email protected]>
Subject: [PATCH] IB/hfi1: Add missing break in switch statement

Fix the following warning by adding a missing break:

drivers/infiniband/hw/hfi1/tid_rdma.c: In function ‘hfi1_tid_rdma_wqe_interlock’:
drivers/infiniband/hw/hfi1/tid_rdma.c:3251:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

   switch (prev->wr.opcode) {
   ^~~~~~

drivers/infiniband/hw/hfi1/tid_rdma.c:3259:2: note: here
case IB_WR_RDMA_READ:
^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.

Fixes c6c231175ccd ("IB/hfi1: Add interlock between TID RDMA WRITE and

other requests")

---
 drivers/infiniband/hw/hfi1/tid_rdma.c | 1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/hw/hfi1/tid_rdma.c +1 -0
index bc2ff83026f7..fdda33aca77f 100644
@@ -3256,6 +3256,7 @@ bool hfi1_tid_rdma_wqe_interlock(struct rvt_qp
 *qp, struct rvt_swqe *wqe)
 		default:
 			break;
 		}
+		break;
 	case IB_WR_RDMA_READ:
 		if (prev->wr.opcode != IB_WR_TID_RDMA_WRITE)
Quoted 2 lines

break;
--

Quoted 1 line

2.20.1

#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 15 lines · Gustavo A. R. Silva

Fix the following warning by adding a missing break:

drivers/infiniband/hw/hfi1/tid_rdma.c: In function ‘hfi1_tid_rdma_wqe_interlock’:
drivers/infiniband/hw/hfi1/tid_rdma.c:3251:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

   switch (prev->wr.opcode) {
   ^~~~~~

drivers/infiniband/hw/hfi1/tid_rdma.c:3259:2: note: here
case IB_WR_RDMA_READ:
^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.

Quoted 6 lines
Fixes c6c231175ccd ("IB/hfi1: Add interlock between TID RDMA WRITE and other requests")

--

 drivers/infiniband/hw/hfi1/tid_rdma.c | 1 +
 1 file changed, 1 insertion(+)

Applied to for-next, thanks

Jason

#3 lore raw
Quoted 16 lines · Jason Gunthorpe
Quoted 15 lines · Gustavo A. R. Silva

Fix the following warning by adding a missing break:

drivers/infiniband/hw/hfi1/tid_rdma.c: In function ‘hfi1_tid_rdma_wqe_interlock’:
drivers/infiniband/hw/hfi1/tid_rdma.c:3251:3: warning: this statement may fall through [-Wimplicit-fallthrough=]

   switch (prev->wr.opcode) {
   ^~~~~~

drivers/infiniband/hw/hfi1/tid_rdma.c:3259:2: note: here
case IB_WR_RDMA_READ:
^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.

Quoted 9 lines
Quoted 6 lines
Fixes c6c231175ccd ("IB/hfi1: Add interlock between TID RDMA WRITE and other requests")

--

 drivers/infiniband/hw/hfi1/tid_rdma.c | 1 +
 1 file changed, 1 insertion(+)

Applied to for-next, thanks

Great. :)

Thank you both, Kaike and Jason.

--
Gustavo