From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 746258D89 for ; Fri, 18 May 2018 16:40:08 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 1F55530C020 for ; Fri, 18 May 2018 07:40:07 -0700 (PDT) Received: from C02VPB22HTD6.vpn.broadcom.net (unknown [10.10.118.241]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id AB2ADAC0753 for ; Fri, 18 May 2018 07:40:06 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Date: Fri, 18 May 2018 07:39:55 -0700 Message-Id: <20180518144001.24801-2-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.15.1 (Apple Git-101) In-Reply-To: <20180518144001.24801-1-ajit.khaparde@broadcom.com> References: <20180518144001.24801-1-ajit.khaparde@broadcom.com> Subject: [dpdk-dev] [PATCH 1/7] net/bnxt: add fallthrough comments for cascading switch cases X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2018 14:40:08 -0000 The FALLTHROUGH comment for cascading switch cases was missing in a few places. This patch adds that. Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_cpr.c | 1 + drivers/net/bnxt/bnxt_ethdev.c | 3 +++ drivers/net/bnxt/bnxt_hwrm.c | 4 ++++ drivers/net/bnxt/bnxt_rxq.c | 1 + 4 files changed, 9 insertions(+) diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c index 8dde8cc0f..7b4f9a14b 100644 --- a/drivers/net/bnxt/bnxt_cpr.c +++ b/drivers/net/bnxt/bnxt_cpr.c @@ -27,6 +27,7 @@ void bnxt_handle_async_event(struct bnxt *bp, case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE: case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE: case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE: + /* FALLTHROUGH */ bnxt_link_update_op(bp->eth_dev, 1); break; case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD: diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 9edcc7b7d..f7f23f75a 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -2432,6 +2432,7 @@ bnxt_fdir_filter(struct rte_eth_dev *dev, switch (filter_op) { case RTE_ETH_FILTER_ADD: case RTE_ETH_FILTER_DELETE: + /* FALLTHROUGH */ filter = bnxt_get_unused_filter(bp); if (filter == NULL) { PMD_DRV_LOG(ERR, @@ -2897,6 +2898,7 @@ static bool bnxt_dir_type_is_ape_bin_format(uint16_t dir_type) case BNX_DIR_TYPE_KONG_PATCH: case BNX_DIR_TYPE_BONO_FW: case BNX_DIR_TYPE_BONO_PATCH: + /* FALLTHROUGH */ return true; } @@ -2915,6 +2917,7 @@ static bool bnxt_dir_type_is_other_exec_format(uint16_t dir_type) case BNX_DIR_TYPE_ISCSI_BOOT: case BNX_DIR_TYPE_ISCSI_BOOT_IPV6: case BNX_DIR_TYPE_ISCSI_BOOT_IPV4N6: + /* FALLTHROUGH */ return true; } diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index d975cb87d..28aa7476d 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -2002,6 +2002,7 @@ static uint16_t bnxt_parse_eth_link_duplex(uint32_t conf_link_speed) switch (conf_link_speed) { case ETH_LINK_SPEED_10M_HD: case ETH_LINK_SPEED_100M_HD: + /* FALLTHROUGH */ return HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_HALF; } return hw_link_duplex; @@ -2022,6 +2023,7 @@ static uint16_t bnxt_parse_eth_link_speed(uint32_t conf_link_speed) switch (conf_link_speed & ~ETH_LINK_SPEED_FIXED) { case ETH_LINK_SPEED_100M: case ETH_LINK_SPEED_100M_HD: + /* FALLTHROUGH */ eth_link_speed = HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_100MB; break; @@ -2186,6 +2188,7 @@ static uint16_t bnxt_parse_hw_link_duplex(uint16_t hw_link_duplex) switch (hw_link_duplex) { case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_BOTH: case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_FULL: + /* FALLTHROUGH */ eth_link_duplex = ETH_LINK_FULL_DUPLEX; break; case HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_HALF: @@ -2315,6 +2318,7 @@ int bnxt_hwrm_func_qcfg(struct bnxt *bp) case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_0: case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_5: case HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR2_0: + /* FALLTHROUGH */ bp->port_partition_type = resp->port_partition_type; break; default: diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 866fb56b1..c55ddec4b 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -77,6 +77,7 @@ int bnxt_mq_rx_configure(struct bnxt *bp) switch (dev_conf->rxmode.mq_mode) { case ETH_MQ_RX_VMDQ_RSS: case ETH_MQ_RX_VMDQ_ONLY: + /* FALLTHROUGH */ /* ETH_8/64_POOLs */ pools = conf->nb_queue_pools; /* For each pool, allocate MACVLAN CFA rule & VNIC */ -- 2.15.1 (Apple Git-101)