Skip to contentSkip to conversation

bnxt_re: Fix -Wimplicit-fallthrough warnings in GCC 7.1

PATCH In review Leon Romanovsky 3 participants 3 messages Jul 13, 2017 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bnxt_re: Fix -Wimplicit-fallthrough warnings in GCC 7.1

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

[59/189] Building C object providers/bnxt_re/CMakeFiles/bnxt_re-rdmav2.dir/verbs.c.o ../providers/bnxt_re/verbs.c: In function ‘bnxt_re_post_send’:
../providers/bnxt_re/verbs.c:1222:18: warning: this statement may fall through [-Wimplicit-fallthrough=]

    hdr->key_immd = htole32(be32toh(wr->imm_data));
                  ^

../providers/bnxt_re/verbs.c:1223:3: note: here
case IBV_WR_SEND:
^~~~
../providers/bnxt_re/verbs.c:1232:18: warning: this statement may fall through [-Wimplicit-fallthrough=]

    hdr->key_immd = htole32(be32toh(wr->imm_data));
                  ^

../providers/bnxt_re/verbs.c:1233:3: note: here
case IBV_WR_RDMA_WRITE:

---
Changelog from v0:
* Used commonly used in rdma-core annotation to mark fail through.

---
 providers/bnxt_re/verbs.c | 2 ++
 1 file changed, 2 insertions(+)
providers/bnxt_re/verbs.c +2 -0
index 1fe79671..b89bcbaa 100644
@@ -1220,6 +1220,7 @@ int bnxt_re_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
 			 * LE platform be32toh will do the job.
 			 */
 			hdr->key_immd = htole32(be32toh(wr->imm_data));
+			/* fall through */
 		case IBV_WR_SEND:
 			if (qp->qptyp == IBV_QPT_UD)
 				bytes = bnxt_re_build_ud_sqe(qp, sqe, wr,
@@ -1230,6 +1231,7 @@ int bnxt_re_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
 			break;
 		case IBV_WR_RDMA_WRITE_WITH_IMM:
 			hdr->key_immd = htole32(be32toh(wr->imm_data));
+			/* fall through */
 		case IBV_WR_RDMA_WRITE:
 			bytes = bnxt_re_build_rdma_sqe(qp, sqe, wr, is_inline);
 			break;

--
2.13.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170713154722.10294-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

#2 lore raw

Something was broken in my scripts, it should be rdma-core and not rdma-next.

Sorry.

Quoted 52 lines · Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

[59/189] Building C object providers/bnxt_re/CMakeFiles/bnxt_re-rdmav2.dir/verbs.c.o ../providers/bnxt_re/verbs.c: In function ‘bnxt_re_post_send’:
../providers/bnxt_re/verbs.c:1222:18: warning: this statement may fall through [-Wimplicit-fallthrough=]

    hdr->key_immd = htole32(be32toh(wr->imm_data));
                  ^
../providers/bnxt_re/verbs.c:1223:3: note: here
   case IBV_WR_SEND:
   ^~~~
../providers/bnxt_re/verbs.c:1232:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
    hdr->key_immd = htole32(be32toh(wr->imm_data));
                  ^

../providers/bnxt_re/verbs.c:1233:3: note: here
case IBV_WR_RDMA_WRITE:

---
Changelog from v0:
* Used commonly used in rdma-core annotation to mark fail through.

---
 providers/bnxt_re/verbs.c | 2 ++
 1 file changed, 2 insertions(+)
providers/bnxt_re/verbs.c +2 -1
index 1fe79671..b89bcbaa 100644
@@ -1220,6 +1220,7 @@ int bnxt_re_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
 			 * LE platform be32toh will do the job.
 			 */
 			hdr->key_immd = htole32(be32toh(wr->imm_data));
+			/* fall through */
 		case IBV_WR_SEND:
 			if (qp->qptyp == IBV_QPT_UD)
 				bytes = bnxt_re_build_ud_sqe(qp, sqe, wr,
@@ -1230,6 +1231,7 @@ int bnxt_re_post_send(struct ibv_qp *ibvqp, struct ibv_send_wr *wr,
 			break;
 		case IBV_WR_RDMA_WRITE_WITH_IMM:
 			hdr->key_immd = htole32(be32toh(wr->imm_data));
+			/* fall through */
 		case IBV_WR_RDMA_WRITE:
 			bytes = bnxt_re_build_rdma_sqe(qp, sqe, wr, is_inline);
 			break;
--

2.13.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Reviewed-by
#3 lore raw
In reply to a message not in the archive
Quoted 13 lines · Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

[59/189] Building C object providers/bnxt_re/CMakeFiles/bnxt_re-rdmav2.dir/verbs.c.o ../providers/bnxt_re/verbs.c: In function ‘bnxt_re_post_send’:
../providers/bnxt_re/verbs.c:1222:18: warning: this statement may fall through [-Wimplicit-fallthrough=]

    hdr->key_immd = htole32(be32toh(wr->imm_data));
                  ^
../providers/bnxt_re/verbs.c:1223:3: note: here
   case IBV_WR_SEND:
   ^~~~
../providers/bnxt_re/verbs.c:1232:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
    hdr->key_immd = htole32(be32toh(wr->imm_data));
                  ^
Quoted 2 lines

../providers/bnxt_re/verbs.c:1233:3: note: here
case IBV_WR_RDMA_WRITE:

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html