[03/17] net/hns3: add default branch to switch in Rx VLAN processing
diff mbox series

Message ID 20200922085401.12272-4-huwei013@chinasoftinc.com
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • updates for hns3 PMD driver
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Wei Hu (Xavier) Sept. 22, 2020, 8:53 a.m. UTC
From: Chengchang Tang <tangchengchang@huawei.com>

This patch solves the static check warning as follow:
"The switch statement must have a 'default' branch".

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox series

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index cf55d94..6d02bad 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -1618,6 +1618,9 @@  hns3_rxd_to_vlan_tci(struct hns3_rx_queue *rxq, struct rte_mbuf *mb,
 		mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 		mb->vlan_tci = rte_le_to_cpu_16(rxd->rx.ot_vlan_tag);
 		return;
+	default:
+		mb->vlan_tci = 0;
+		return;
 	}
 }