mirror of https://gitee.com/openkylin/linux.git
ice: remove unnecessary fallthrough comments
Fallthrough comments are used to explicitly indicate the code is intended to flow from one case statement to the next in a switch statement rather than break out of the switch statement. They are only needed when a case has one or more statements to execute before falling through to the next case, not when there is a list of cases for which the same statement(s) should be executed. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
24e2e2a0b8
commit
752eee0678
|
@ -247,7 +247,6 @@ ice_setup_tx_ctx(struct ice_ring *ring, struct ice_tlan_ctx *tlan_ctx, u16 pf_q)
|
||||||
*/
|
*/
|
||||||
switch (vsi->type) {
|
switch (vsi->type) {
|
||||||
case ICE_VSI_LB:
|
case ICE_VSI_LB:
|
||||||
/* fall through */
|
|
||||||
case ICE_VSI_PF:
|
case ICE_VSI_PF:
|
||||||
tlan_ctx->vmvf_type = ICE_TLAN_CTX_VMVF_TYPE_PF;
|
tlan_ctx->vmvf_type = ICE_TLAN_CTX_VMVF_TYPE_PF;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1091,7 +1091,6 @@ ice_get_fecparam(struct net_device *netdev, struct ethtool_fecparam *fecparam)
|
||||||
fecparam->active_fec = ETHTOOL_FEC_BASER;
|
fecparam->active_fec = ETHTOOL_FEC_BASER;
|
||||||
break;
|
break;
|
||||||
case ICE_AQ_LINK_25G_RS_528_FEC_EN:
|
case ICE_AQ_LINK_25G_RS_528_FEC_EN:
|
||||||
/* fall through */
|
|
||||||
case ICE_AQ_LINK_25G_RS_544_FEC_EN:
|
case ICE_AQ_LINK_25G_RS_544_FEC_EN:
|
||||||
fecparam->active_fec = ETHTOOL_FEC_RS;
|
fecparam->active_fec = ETHTOOL_FEC_RS;
|
||||||
break;
|
break;
|
||||||
|
@ -1781,7 +1780,6 @@ ice_get_settings_link_up(struct ethtool_link_ksettings *ks,
|
||||||
Asym_Pause);
|
Asym_Pause);
|
||||||
break;
|
break;
|
||||||
case ICE_FC_PFC:
|
case ICE_FC_PFC:
|
||||||
/* fall through */
|
|
||||||
default:
|
default:
|
||||||
ethtool_link_ksettings_del_link_mode(ks, lp_advertising, Pause);
|
ethtool_link_ksettings_del_link_mode(ks, lp_advertising, Pause);
|
||||||
ethtool_link_ksettings_del_link_mode(ks, lp_advertising,
|
ethtool_link_ksettings_del_link_mode(ks, lp_advertising,
|
||||||
|
|
|
@ -121,7 +121,6 @@ static void ice_vsi_set_num_desc(struct ice_vsi *vsi)
|
||||||
{
|
{
|
||||||
switch (vsi->type) {
|
switch (vsi->type) {
|
||||||
case ICE_VSI_PF:
|
case ICE_VSI_PF:
|
||||||
/* fall through */
|
|
||||||
case ICE_VSI_LB:
|
case ICE_VSI_LB:
|
||||||
vsi->num_rx_desc = ICE_DFLT_NUM_RX_DESC;
|
vsi->num_rx_desc = ICE_DFLT_NUM_RX_DESC;
|
||||||
vsi->num_tx_desc = ICE_DFLT_NUM_TX_DESC;
|
vsi->num_tx_desc = ICE_DFLT_NUM_TX_DESC;
|
||||||
|
@ -817,7 +816,6 @@ static int ice_vsi_init(struct ice_vsi *vsi, bool init_vsi)
|
||||||
ctxt->info = vsi->info;
|
ctxt->info = vsi->info;
|
||||||
switch (vsi->type) {
|
switch (vsi->type) {
|
||||||
case ICE_VSI_LB:
|
case ICE_VSI_LB:
|
||||||
/* fall through */
|
|
||||||
case ICE_VSI_PF:
|
case ICE_VSI_PF:
|
||||||
ctxt->flags = ICE_AQ_VSI_TYPE_PF;
|
ctxt->flags = ICE_AQ_VSI_TYPE_PF;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -706,7 +706,6 @@ void ice_print_link_msg(struct ice_vsi *vsi, bool isup)
|
||||||
/* Get FEC mode based on negotiated link info */
|
/* Get FEC mode based on negotiated link info */
|
||||||
switch (vsi->port_info->phy.link_info.fec_info) {
|
switch (vsi->port_info->phy.link_info.fec_info) {
|
||||||
case ICE_AQ_LINK_25G_RS_528_FEC_EN:
|
case ICE_AQ_LINK_25G_RS_528_FEC_EN:
|
||||||
/* fall through */
|
|
||||||
case ICE_AQ_LINK_25G_RS_544_FEC_EN:
|
case ICE_AQ_LINK_25G_RS_544_FEC_EN:
|
||||||
fec = "RS-FEC";
|
fec = "RS-FEC";
|
||||||
break;
|
break;
|
||||||
|
@ -2955,7 +2954,6 @@ ice_log_pkg_init(struct ice_hw *hw, enum ice_status *status)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ICE_ERR_BUF_TOO_SHORT:
|
case ICE_ERR_BUF_TOO_SHORT:
|
||||||
/* fall-through */
|
|
||||||
case ICE_ERR_CFG:
|
case ICE_ERR_CFG:
|
||||||
dev_err(dev, "The DDP package file is invalid. Entering Safe Mode.\n");
|
dev_err(dev, "The DDP package file is invalid. Entering Safe Mode.\n");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -121,9 +121,7 @@ u32 ice_conv_link_speed_to_virtchnl(bool adv_link_support, u16 link_speed)
|
||||||
speed = (u32)VIRTCHNL_LINK_SPEED_25GB;
|
speed = (u32)VIRTCHNL_LINK_SPEED_25GB;
|
||||||
break;
|
break;
|
||||||
case ICE_AQ_LINK_SPEED_40GB:
|
case ICE_AQ_LINK_SPEED_40GB:
|
||||||
/* fall through */
|
|
||||||
case ICE_AQ_LINK_SPEED_50GB:
|
case ICE_AQ_LINK_SPEED_50GB:
|
||||||
/* fall through */
|
|
||||||
case ICE_AQ_LINK_SPEED_100GB:
|
case ICE_AQ_LINK_SPEED_100GB:
|
||||||
speed = (u32)VIRTCHNL_LINK_SPEED_40GB;
|
speed = (u32)VIRTCHNL_LINK_SPEED_40GB;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1188,7 +1188,6 @@ ice_adjust_itr_by_size_and_speed(struct ice_port_info *port_info,
|
||||||
avg_pkt_size + 640);
|
avg_pkt_size + 640);
|
||||||
break;
|
break;
|
||||||
case ICE_AQ_LINK_SPEED_10GB:
|
case ICE_AQ_LINK_SPEED_10GB:
|
||||||
/* fall through */
|
|
||||||
default:
|
default:
|
||||||
itr += DIV_ROUND_UP(170 * (avg_pkt_size + 24),
|
itr += DIV_ROUND_UP(170 * (avg_pkt_size + 24),
|
||||||
avg_pkt_size + 640);
|
avg_pkt_size + 640);
|
||||||
|
|
Loading…
Reference in New Issue