diff mbox

[v2,28/45] IB/nes: Suppress gcc 7 fall-through complaints

Message ID 20171011174927.25113-29-bart.vanassche@wdc.com (mailing list archive)
State Accepted
Headers show

Commit Message

Bart Van Assche Oct. 11, 2017, 5:49 p.m. UTC
Avoid that gcc 7 reports the following warning when building with W=1:

warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Faisal Latif <faisal.latif@intel.com>
---
 drivers/infiniband/hw/nes/nes_cm.c | 1 +
 drivers/infiniband/hw/nes/nes_hw.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Faisal Latif Oct. 11, 2017, 6:11 p.m. UTC | #1
>-----Original Message-----
>From: Bart Van Assche [mailto:bart.vanassche@wdc.com]
>Sent: Wednesday, October 11, 2017 12:49 PM
>To: Doug Ledford <dledford@redhat.com>
>Cc: linux-rdma@vger.kernel.org; Bart Van Assche <bart.vanassche@wdc.com>;
>Latif, Faisal <faisal.latif@intel.com>
>Subject: [PATCH v2 28/45] IB/nes: Suppress gcc 7 fall-through complaints
>
>Avoid that gcc 7 reports the following warning when building with W=1:
>
>warning: this statement may fall through [-Wimplicit-fallthrough=]
>
>Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
>Cc: Faisal Latif <faisal.latif@intel.com>
>---
> drivers/infiniband/hw/nes/nes_cm.c | 1 +
>drivers/infiniband/hw/nes/nes_hw.c | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/infiniband/hw/nes/nes_cm.c
>b/drivers/infiniband/hw/nes/nes_cm.c
>index de4025deaa4a..a5f6dffef07a 100644
>--- a/drivers/infiniband/hw/nes/nes_cm.c
>+++ b/drivers/infiniband/hw/nes/nes_cm.c
>@@ -1768,6 +1768,7 @@ static void handle_rst_pkt(struct nes_cm_node
>*cm_node, struct sk_buff *skb,
> 	case NES_CM_STATE_FIN_WAIT1:
> 	case NES_CM_STATE_LAST_ACK:
> 		cm_node->cm_id->rem_ref(cm_node->cm_id);
>+		/* fall through */
> 	case NES_CM_STATE_TIME_WAIT:
> 		cm_node->state = NES_CM_STATE_CLOSED;
> 		rem_ref_cm_node(cm_node->cm_core, cm_node); diff --git
>a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
>index 812b59d8f13c..c392f83c0629 100644
>--- a/drivers/infiniband/hw/nes/nes_hw.c
>+++ b/drivers/infiniband/hw/nes/nes_hw.c
>@@ -3632,7 +3632,7 @@ static void nes_process_iwarp_aeqe(struct
>nes_device *nesdev,
> 				aeq_info |=
>NES_AEQE_AEID_RDMAP_ROE_UNEXPECTED_OPCODE;
> 				aeqe->aeqe_words[NES_AEQE_MISC_IDX] =
>cpu_to_le32(aeq_info);
> 			}
>-
>+			/* fall through */
> 		case NES_AEQE_AEID_RDMAP_ROE_BAD_LLP_CLOSE:
> 		case NES_AEQE_AEID_LLP_TOO_MANY_RETRIES:
> 		case
>NES_AEQE_AEID_DDP_UBE_INVALID_MSN_NO_BUFFER_AVAILABLE:
>--
>2.14.2

Acked-by: Faisal Latif <fasial.latif@intel.com>
--
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
diff mbox

Patch

diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index de4025deaa4a..a5f6dffef07a 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1768,6 +1768,7 @@  static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
 	case NES_CM_STATE_FIN_WAIT1:
 	case NES_CM_STATE_LAST_ACK:
 		cm_node->cm_id->rem_ref(cm_node->cm_id);
+		/* fall through */
 	case NES_CM_STATE_TIME_WAIT:
 		cm_node->state = NES_CM_STATE_CLOSED;
 		rem_ref_cm_node(cm_node->cm_core, cm_node);
diff --git a/drivers/infiniband/hw/nes/nes_hw.c b/drivers/infiniband/hw/nes/nes_hw.c
index 812b59d8f13c..c392f83c0629 100644
--- a/drivers/infiniband/hw/nes/nes_hw.c
+++ b/drivers/infiniband/hw/nes/nes_hw.c
@@ -3632,7 +3632,7 @@  static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
 				aeq_info |= NES_AEQE_AEID_RDMAP_ROE_UNEXPECTED_OPCODE;
 				aeqe->aeqe_words[NES_AEQE_MISC_IDX] = cpu_to_le32(aeq_info);
 			}
-
+			/* fall through */
 		case NES_AEQE_AEID_RDMAP_ROE_BAD_LLP_CLOSE:
 		case NES_AEQE_AEID_LLP_TOO_MANY_RETRIES:
 		case NES_AEQE_AEID_DDP_UBE_INVALID_MSN_NO_BUFFER_AVAILABLE: