Skip to content

Commit

Permalink
Merge branch 'break_after_return'
Browse files Browse the repository at this point in the history
Fabian Frederick says:

====================
drivers/net: remove unnecessary break after return

Second patchset after "remove unnecessary break after goto" addressing break redundancy on drivers/net branch
(suggested by Joe Perches)
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 21, 2014
2 parents fa4eff4 + b684106 commit 1b31a1b
Show file tree
Hide file tree
Showing 37 changed files with 0 additions and 71 deletions.
1 change: 0 additions & 1 deletion drivers/net/cris/eth_v10.c
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,6 @@ e100_set_config(struct net_device *dev, struct ifmap *map)
case IF_PORT_AUI:
spin_unlock(&np->lock);
return -EOPNOTSUPP;
break;
default:
printk(KERN_ERR "%s: Invalid media selected", dev->name);
spin_unlock(&np->lock);
Expand Down
8 changes: 0 additions & 8 deletions drivers/net/ethernet/8390/mac8390.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,24 +178,19 @@ static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
case NUBUS_DRHW_APPLE_SONIC_LC:
case NUBUS_DRHW_SONNET:
return MAC8390_NONE;
break;
default:
return MAC8390_APPLE;
break;
}
break;

case NUBUS_DRSW_APPLE:
switch (dev->dr_hw) {
case NUBUS_DRHW_ASANTE_LC:
return MAC8390_NONE;
break;
case NUBUS_DRHW_CABLETRON:
return MAC8390_CABLETRON;
break;
default:
return MAC8390_APPLE;
break;
}
break;

Expand All @@ -220,10 +215,8 @@ static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
switch (dev->dr_hw) {
case NUBUS_DRHW_INTERLAN:
return MAC8390_INTERLAN;
break;
default:
return MAC8390_KINETICS;
break;
}
break;

Expand Down Expand Up @@ -563,7 +556,6 @@ static int __init mac8390_initdev(struct net_device *dev,
case ACCESS_UNKNOWN:
pr_err("Don't know how to access card memory!\n");
return -ENODEV;
break;

case ACCESS_16:
/* 16 bit card, register map is reversed */
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,6 @@ int atl1c_phy_init(struct atl1c_hw *hw)
dev_err(&pdev->dev, "Wrong Media type %d\n",
hw->media_type);
return -1;
break;
}

ret_val = atl1c_write_phy_reg(hw, MII_BMCR, mii_bmcr_data);
Expand Down Expand Up @@ -682,7 +681,6 @@ int atl1c_get_speed_and_duplex(struct atl1c_hw *hw, u16 *speed, u16 *duplex)
break;
default:
return -1;
break;
}

if (phy_data & GIGA_PSSR_DPLX)
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/atheros/atl1e/atl1e_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,6 @@ int atl1e_get_speed_and_duplex(struct atl1e_hw *hw, u16 *speed, u16 *duplex)
break;
default:
return AT_ERR_PHY_SPEED;
break;
}

if (phy_data & MII_AT001_PSSR_DPLX)
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/atheros/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,6 @@ static s32 atl1_get_speed_and_duplex(struct atl1_hw *hw, u16 *speed, u16 *duplex
if (netif_msg_hw(adapter))
dev_dbg(&pdev->dev, "error getting speed\n");
return ATLX_ERR_PHY_SPEED;
break;
}
if (phy_data & MII_ATLX_PSSR_DPLX)
*duplex = FULL_DUPLEX;
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/ethernet/atheros/atlx/atl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2493,7 +2493,6 @@ static s32 atl2_get_speed_and_duplex(struct atl2_hw *hw, u16 *speed,
break;
default:
return ATLX_ERR_PHY_SPEED;
break;
}

if (phy_data & MII_ATLX_PSSR_DPLX)
Expand Down Expand Up @@ -2933,11 +2932,9 @@ static int atl2_validate_option(int *value, struct atl2_option *opt)
case OPTION_ENABLED:
printk(KERN_INFO "%s Enabled\n", opt->name);
return 0;
break;
case OPTION_DISABLED:
printk(KERN_INFO "%s Disabled\n", opt->name);
return 0;
break;
}
break;
case range_option:
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/ethernet/brocade/bna/cna_fwimg.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ bfa_cb_image_get_chunk(enum bfi_asic_gen asic_gen, u32 off)
switch (asic_gen) {
case BFI_ASIC_GEN_CT:
return (bfi_image_ct_cna + off);
break;
case BFI_ASIC_GEN_CT2:
return (bfi_image_ct2_cna + off);
break;
default:
return NULL;
}
Expand All @@ -83,10 +81,8 @@ bfa_cb_image_get_size(enum bfi_asic_gen asic_gen)
switch (asic_gen) {
case BFI_ASIC_GEN_CT:
return bfi_image_ct_cna_size;
break;
case BFI_ASIC_GEN_CT2:
return bfi_image_ct2_cna_size;
break;
default:
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/dec/tulip/de4x5.c
Original file line number Diff line number Diff line change
Expand Up @@ -3250,7 +3250,6 @@ srom_map_media(struct net_device *dev)
printk("%s: Bad media code [%d] detected in SROM!\n", dev->name,
lp->infoblock_media);
return -1;
break;
}

return 0;
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/freescale/ucc_geth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2396,7 +2396,6 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
if (netif_msg_ifup(ugeth))
pr_err("Bad number of Rx threads value\n");
return -EINVAL;
break;
}

switch (ug_info->numThreadsTx) {
Expand All @@ -2419,7 +2418,6 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth)
if (netif_msg_ifup(ugeth))
pr_err("Bad number of Tx threads value\n");
return -EINVAL;
break;
}

/* Calculate rx_extended_features */
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/ethernet/intel/e1000/e1000_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,6 @@ static int e1000_set_phy_loopback(struct e1000_adapter *adapter)
case e1000_82547:
case e1000_82547_rev_2:
return e1000_integrated_phy_loopback(adapter);
break;
default:
/* Default PHY loopback work is to read the MII
* control register and assert bit 14 (loopback mode).
Expand All @@ -1325,7 +1324,6 @@ static int e1000_set_phy_loopback(struct e1000_adapter *adapter)
phy_reg |= MII_CR_LOOPBACK;
e1000_write_phy_reg(hw, PHY_CTRL, phy_reg);
return 0;
break;
}

return 8;
Expand All @@ -1344,7 +1342,6 @@ static int e1000_setup_loopback_test(struct e1000_adapter *adapter)
case e1000_82545_rev_3:
case e1000_82546_rev_3:
return e1000_set_phy_loopback(adapter);
break;
default:
rctl = er32(RCTL);
rctl |= E1000_RCTL_LBM_TCVR;
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/intel/e1000/e1000_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,6 @@ static s32 e1000_setup_fiber_serdes_link(struct e1000_hw *hw)
default:
e_dbg("Flow control param set incorrectly\n");
return -E1000_ERR_CONFIG;
break;
}

/* Since auto-negotiation is enabled, take the link out of reset (the
Expand Down Expand Up @@ -5041,7 +5040,6 @@ static s32 e1000_get_cable_length(struct e1000_hw *hw, u16 *min_length,
break;
default:
return -E1000_ERR_PHY;
break;
}
} else if (hw->phy_type == e1000_phy_igp) { /* For IGP PHY */
u16 cur_agc_value;
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/ethernet/intel/e1000e/82571.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ static s32 e1000_init_phy_params_82571(struct e1000_hw *hw)
break;
default:
return -E1000_ERR_PHY;
break;
}

/* This can only be done after all function pointers are setup. */
Expand Down Expand Up @@ -422,7 +421,6 @@ static s32 e1000_get_phy_id_82571(struct e1000_hw *hw)
break;
case e1000_82573:
return e1000e_get_phy_id(hw);
break;
case e1000_82574:
case e1000_82583:
ret_val = e1e_rphy(hw, MII_PHYSID1, &phy_id);
Expand All @@ -440,7 +438,6 @@ static s32 e1000_get_phy_id_82571(struct e1000_hw *hw)
break;
default:
return -E1000_ERR_PHY;
break;
}

return 0;
Expand Down Expand Up @@ -1458,7 +1455,6 @@ static s32 e1000_setup_copper_link_82571(struct e1000_hw *hw)
break;
default:
return -E1000_ERR_PHY;
break;
}

if (ret_val)
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/intel/e1000e/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1521,11 +1521,9 @@ static int e1000_setup_loopback_test(struct e1000_adapter *adapter)
switch (hw->mac.type) {
case e1000_80003es2lan:
return e1000_set_es2lan_mac_loopback(adapter);
break;
case e1000_82571:
case e1000_82572:
return e1000_set_82571_fiber_loopback(adapter);
break;
default:
rctl = er32(RCTL);
rctl |= E1000_RCTL_LBM_TCVR;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/intel/e1000e/ich8lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,6 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw)
break;
default:
return -E1000_ERR_PHY;
break;
}

return 0;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/intel/e1000e/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,6 @@ static s32 e1000_commit_fc_settings_generic(struct e1000_hw *hw)
default:
e_dbg("Flow control param set incorrectly\n");
return -E1000_ERR_CONFIG;
break;
}

ew32(TXCW, txcw);
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/intel/igb/e1000_82575.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,6 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
break;
default:
return -E1000_ERR_MAC_INIT;
break;
}

/* Set media type */
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ static int ixgbe_dcbnl_getnumtcs(struct net_device *netdev, int tcid, u8 *num)
break;
default:
return -EINVAL;
break;
}
} else {
return -EINVAL;
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,6 @@ static int ixgbe_reg_test(struct ixgbe_adapter *adapter, u64 *data)
default:
*data = 1;
return 1;
break;
}

/*
Expand Down Expand Up @@ -2866,7 +2865,6 @@ static int ixgbe_get_ts_info(struct net_device *dev,
break;
default:
return ethtool_op_get_ts_info(dev, info);
break;
}
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/sis/sis900.c
Original file line number Diff line number Diff line change
Expand Up @@ -2258,7 +2258,6 @@ static int sis900_set_config(struct net_device *dev, struct ifmap *map)
case IF_PORT_100BASEFX: /* 100BaseFx */
/* These Modes are not supported (are they?)*/
return -EOPNOTSUPP;
break;

default:
return -EINVAL;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/sun/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2584,7 +2584,6 @@ static int niu_determine_phy_disposition(struct niu *np)
break;
default:
return -EINVAL;
break;
}
phy_addr_off = niu_atca_port_num[np->port];
break;
Expand Down
7 changes: 0 additions & 7 deletions drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
Original file line number Diff line number Diff line change
Expand Up @@ -1828,25 +1828,18 @@ static const char *wpasecstr(enum gelic_eurus_wpa_security sec)
switch (sec) {
case GELIC_EURUS_WPA_SEC_NONE:
return "NONE";
break;
case GELIC_EURUS_WPA_SEC_WPA_TKIP_TKIP:
return "WPA_TKIP_TKIP";
break;
case GELIC_EURUS_WPA_SEC_WPA_TKIP_AES:
return "WPA_TKIP_AES";
break;
case GELIC_EURUS_WPA_SEC_WPA_AES_AES:
return "WPA_AES_AES";
break;
case GELIC_EURUS_WPA_SEC_WPA2_TKIP_TKIP:
return "WPA2_TKIP_TKIP";
break;
case GELIC_EURUS_WPA_SEC_WPA2_TKIP_AES:
return "WPA2_TKIP_AES";
break;
case GELIC_EURUS_WPA_SEC_WPA2_AES_AES:
return "WPA2_AES_AES";
break;
}
return "";
};
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wan/dlci.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ static int dlci_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return -EINVAL;

return dlci_config(dev, ifr->ifr_data, cmd == DLCI_GET_CONF);
break;

default:
return -EOPNOTSUPP;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -7818,7 +7818,6 @@ static int readrids(struct net_device *dev, aironet_ioctl *comp) {
case AIRORRID: ridcode = comp->ridnum; break;
default:
return -EINVAL;
break;
}

if ((iobuf = kmalloc(RIDSIZE, GFP_KERNEL)) == NULL)
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/ath/ath6kl/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,6 @@ static int ath6kl_upload_board_file(struct ath6kl *ar)
default:
WARN_ON(1);
return -EINVAL;
break;
}

if (board_ext_address &&
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/ath/carl9170/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,6 @@ static int carl9170_set_freq_cal_data(struct ar9170 *ar,

default:
return -EINVAL;
break;
}

for (; i >= 0; i--) {
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/brcm80211/brcmfmac/p2p.c
Original file line number Diff line number Diff line change
Expand Up @@ -2364,7 +2364,6 @@ int brcmf_p2p_del_vif(struct wiphy *wiphy, struct wireless_dev *wdev)
return 0;
default:
return -ENOTSUPP;
break;
}

clear_bit(BRCMF_P2P_STATUS_GO_NEG_PHASE, &p2p->status);
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c
Original file line number Diff line number Diff line change
Expand Up @@ -22916,7 +22916,6 @@ static void wlc_phy_rssi_cal_nphy_rev2(struct brcms_phy *pi, u8 rssi_type)
break;
default:
return;
break;
}

classif_state = wlc_phy_classifier_nphy(pi, 0, 0);
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/cw1200/fwio.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ static int config_reg_write(struct cw1200_common *priv, u32 val)
case HIF_8601_SILICON:
default:
return cw1200_reg_write_32(priv, ST90TDS_CONFIG_REG_ID, val);
break;
}
return 0;
}
Expand Down
Loading

0 comments on commit 1b31a1b

Please sign in to comment.