Skip to contentSkip to conversation

qed: Fix fall-through warnings for Clang

PATCH RESEND Superseded Gustavo A. R. Silva 1 participant 1 message Mar 10, 2021

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 qed: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple of break statements instead of just letting the code fall through to the next case.

---
Changes in RESEND:
- None. Resending now that net-next is open.

 drivers/net/ethernet/qlogic/qed/qed_l2.c    | 1 +
 drivers/net/ethernet/qlogic/qed/qed_sriov.c | 1 +
 2 files changed, 2 insertions(+)
drivers/net/ethernet/qlogic/qed/qed_l2.c +1 -0
index 07824bf9d68d..dfaf10edfabf 100644
@@ -396,6 +396,7 @@ int qed_sp_eth_vport_start(struct qed_hwfn *p_hwfn,
 		tpa_param->tpa_ipv6_en_flg = 1;
 		tpa_param->tpa_pkt_split_flg = 1;
 		tpa_param->tpa_gro_consistent_flg = 1;
+		break;
 	default:
 		break;
 	}
drivers/net/ethernet/qlogic/qed/qed_sriov.c +1 -0
index b8dc5c4591ef..ed2b6fe5a78d 100644
@@ -4734,6 +4734,7 @@ void qed_inform_vf_link_state(struct qed_hwfn *hwfn)
 			 */
 			link.speed = (hwfn->cdev->num_hwfns > 1) ?
 				     100000 : 40000;
+			break;
 		default:
 			/* In auto mode pass PF link image to VF */
 			break;
Signature · 1 line
2.27.0