diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2011-01-06 02:02:53 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-01-24 03:13:56 -0500 |
commit | 90da06692532541a38f9857972e1fd6b1cdfb45a (patch) | |
tree | b57994ef65c615e0cf34a57f692fed67b95f3dd1 /drivers/net/e1000e/phy.c | |
parent | 67fd4fcb78a7ced369a6bd8a131ec8c65ebd2bbb (diff) |
e1000e: reduce scope of some variables, remove unnecessary ones
Static analysis of the driver code found some variables for which the scope
can be reduced, or remove the variable altogether.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/e1000e/phy.c')
-rw-r--r-- | drivers/net/e1000e/phy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/e1000e/phy.c b/drivers/net/e1000e/phy.c index 6bea051b134b..6ae31fcfb629 100644 --- a/drivers/net/e1000e/phy.c +++ b/drivers/net/e1000e/phy.c | |||
@@ -2409,9 +2409,7 @@ static u32 e1000_get_phy_addr_for_bm_page(u32 page, u32 reg) | |||
2409 | s32 e1000e_write_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 data) | 2409 | s32 e1000e_write_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 data) |
2410 | { | 2410 | { |
2411 | s32 ret_val; | 2411 | s32 ret_val; |
2412 | u32 page_select = 0; | ||
2413 | u32 page = offset >> IGP_PAGE_SHIFT; | 2412 | u32 page = offset >> IGP_PAGE_SHIFT; |
2414 | u32 page_shift = 0; | ||
2415 | 2413 | ||
2416 | ret_val = hw->phy.ops.acquire(hw); | 2414 | ret_val = hw->phy.ops.acquire(hw); |
2417 | if (ret_val) | 2415 | if (ret_val) |
@@ -2427,6 +2425,8 @@ s32 e1000e_write_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 data) | |||
2427 | hw->phy.addr = e1000_get_phy_addr_for_bm_page(page, offset); | 2425 | hw->phy.addr = e1000_get_phy_addr_for_bm_page(page, offset); |
2428 | 2426 | ||
2429 | if (offset > MAX_PHY_MULTI_PAGE_REG) { | 2427 | if (offset > MAX_PHY_MULTI_PAGE_REG) { |
2428 | u32 page_shift, page_select; | ||
2429 | |||
2430 | /* | 2430 | /* |
2431 | * Page select is register 31 for phy address 1 and 22 for | 2431 | * Page select is register 31 for phy address 1 and 22 for |
2432 | * phy address 2 and 3. Page select is shifted only for | 2432 | * phy address 2 and 3. Page select is shifted only for |
@@ -2468,9 +2468,7 @@ out: | |||
2468 | s32 e1000e_read_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 *data) | 2468 | s32 e1000e_read_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 *data) |
2469 | { | 2469 | { |
2470 | s32 ret_val; | 2470 | s32 ret_val; |
2471 | u32 page_select = 0; | ||
2472 | u32 page = offset >> IGP_PAGE_SHIFT; | 2471 | u32 page = offset >> IGP_PAGE_SHIFT; |
2473 | u32 page_shift = 0; | ||
2474 | 2472 | ||
2475 | ret_val = hw->phy.ops.acquire(hw); | 2473 | ret_val = hw->phy.ops.acquire(hw); |
2476 | if (ret_val) | 2474 | if (ret_val) |
@@ -2486,6 +2484,8 @@ s32 e1000e_read_phy_reg_bm(struct e1000_hw *hw, u32 offset, u16 *data) | |||
2486 | hw->phy.addr = e1000_get_phy_addr_for_bm_page(page, offset); | 2484 | hw->phy.addr = e1000_get_phy_addr_for_bm_page(page, offset); |
2487 | 2485 | ||
2488 | if (offset > MAX_PHY_MULTI_PAGE_REG) { | 2486 | if (offset > MAX_PHY_MULTI_PAGE_REG) { |
2487 | u32 page_shift, page_select; | ||
2488 | |||
2489 | /* | 2489 | /* |
2490 | * Page select is register 31 for phy address 1 and 22 for | 2490 | * Page select is register 31 for phy address 1 and 22 for |
2491 | * phy address 2 and 3. Page select is shifted only for | 2491 | * phy address 2 and 3. Page select is shifted only for |