@@ -43,11 +43,10 @@ static s32 e1000_init_phy_params_80003es2lan(struct e1000_hw *hw)
if (hw->phy.media_type != e1000_media_type_copper) {
phy->type = e1000_phy_none;
return 0;
- } else {
- phy->ops.power_up = e1000_power_up_phy_copper;
- phy->ops.power_down = e1000_power_down_phy_copper_80003es2lan;
}
+ phy->ops.power_up = e1000_power_up_phy_copper;
+ phy->ops.power_down = e1000_power_down_phy_copper_80003es2lan;
phy->addr = 1;
phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
phy->reset_delay_us = 100;
@@ -3592,9 +3592,8 @@ static s32 e1000_read_flash_byte_ich8lan(struct e1000_hw *hw, u32 offset,
*/
if (hw->mac.type >= e1000_pch_spt)
return -E1000_ERR_NVM;
- else
- ret_val = e1000_read_flash_data_ich8lan(hw, offset, 1, &word);
+ ret_val = e1000_read_flash_data_ich8lan(hw, offset, 1, &word);
if (ret_val)
return ret_val;
@@ -3659,20 +3658,20 @@ static s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
else if (size == 2)
*data = (u16)(flash_data & 0x0000FFFF);
break;
- } else {
- /* If we've gotten here, then things are probably
- * completely hosed, but if the error condition is
- * detected, it won't hurt to give it another try...
- * ICH_FLASH_CYCLE_REPEAT_COUNT times.
- */
- hsfsts.regval = er16flash(ICH_FLASH_HSFSTS);
- if (hsfsts.hsf_status.flcerr) {
- /* Repeat for some time before giving up. */
- continue;
- } else if (!hsfsts.hsf_status.flcdone) {
- e_dbg("Timeout error - flash cycle did not complete.\n");
- break;
- }
+ }
+
+ /* If we've gotten here, then things are probably
+ * completely hosed, but if the error condition is
+ * detected, it won't hurt to give it another try...
+ * ICH_FLASH_CYCLE_REPEAT_COUNT times.
+ */
+ hsfsts.regval = er16flash(ICH_FLASH_HSFSTS);
+ if (hsfsts.hsf_status.flcerr) {
+ /* Repeat for some time before giving up. */
+ continue;
+ } else if (!hsfsts.hsf_status.flcdone) {
+ e_dbg("Timeout error - flash cycle did not complete.\n");
+ break;
}
} while (count++ < ICH_FLASH_CYCLE_REPEAT_COUNT);
@@ -3734,20 +3733,20 @@ static s32 e1000_read_flash_data32_ich8lan(struct e1000_hw *hw, u32 offset,
if (!ret_val) {
*data = er32flash(ICH_FLASH_FDATA0);
break;
- } else {
- /* If we've gotten here, then things are probably
- * completely hosed, but if the error condition is
- * detected, it won't hurt to give it another try...
- * ICH_FLASH_CYCLE_REPEAT_COUNT times.
- */
- hsfsts.regval = er16flash(ICH_FLASH_HSFSTS);
- if (hsfsts.hsf_status.flcerr) {
- /* Repeat for some time before giving up. */
- continue;
- } else if (!hsfsts.hsf_status.flcdone) {
- e_dbg("Timeout error - flash cycle did not complete.\n");
- break;
- }
+ }
+
+ /* If we've gotten here, then things are probably
+ * completely hosed, but if the error condition is
+ * detected, it won't hurt to give it another try...
+ * ICH_FLASH_CYCLE_REPEAT_COUNT times.
+ */
+ hsfsts.regval = er16flash(ICH_FLASH_HSFSTS);
+ if (hsfsts.hsf_status.flcerr) {
+ /* Repeat for some time before giving up. */
+ continue;
+ } else if (!hsfsts.hsf_status.flcdone) {
+ e_dbg("Timeout error - flash cycle did not complete.\n");
+ break;
}
} while (count++ < ICH_FLASH_CYCLE_REPEAT_COUNT);
`else' is not generally useful after a break or return Signed-off-by: Baozhu Ni <nibaozhu@yeah.net> --- .../net/ethernet/intel/e1000e/80003es2lan.c | 5 +- drivers/net/ethernet/intel/e1000e/ich8lan.c | 59 +++++++++---------- 2 files changed, 31 insertions(+), 33 deletions(-)