[07/10] net/e1000: fix maybe-uninitialized warnings for LTO build
Checks
Commit Message
During LTO build compiler reports some 'false positive' warnings about
variables being possibly used uninitialized. This patch silences these
warnings.
Signed-off-by: Andrzej Ostruszka <aostruszka@marvell.com>
---
drivers/net/e1000/base/e1000_82543.c | 2 +-
drivers/net/e1000/base/e1000_ich8lan.c | 2 +-
drivers/net/e1000/base/e1000_phy.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
@@ -1027,7 +1027,7 @@ STATIC s32 e1000_setup_copper_link_82543(struct e1000_hw *hw)
{
u32 ctrl;
s32 ret_val;
- bool link;
+ bool link = true;
DEBUGFUNC("e1000_setup_copper_link_82543");
@@ -5533,7 +5533,7 @@ void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw)
void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw)
{
s32 ret_val;
- u16 reg_data;
+ u16 reg_data = 0;
DEBUGFUNC("e1000_gig_downshift_workaround_ich8lan");
@@ -1664,7 +1664,7 @@ s32 e1000_copper_link_autoneg(struct e1000_hw *hw)
s32 e1000_setup_copper_link_generic(struct e1000_hw *hw)
{
s32 ret_val;
- bool link;
+ bool link = true;
DEBUGFUNC("e1000_setup_copper_link_generic");