Re: [PATCH] net: stmmac: Avoid sometimes uninitialized Clang warnings

2019-03-07 Thread Nick Desaulniers
On Thu, Mar 7, 2019 at 9:49 AM David Miller wrote: > > From: Nathan Chancellor > Date: Thu, 7 Mar 2019 09:21:01 -0700 > > > @@ -565,7 +565,7 @@ static int stmmac_hwtstamp_set(struct net_device *dev, > > struct ifreq *ifr) > > u32 ts_master_en = 0; > > u32 ts_event_en = 0; > >

Re: [PATCH] net: stmmac: Avoid sometimes uninitialized Clang warnings

2019-03-07 Thread David Miller
From: Nathan Chancellor Date: Thu, 7 Mar 2019 09:21:01 -0700 > @@ -565,7 +565,7 @@ static int stmmac_hwtstamp_set(struct net_device *dev, > struct ifreq *ifr) > u32 ts_master_en = 0; > u32 ts_event_en = 0; > u32 value = 0; > - u32 sec_inc; > + u32 sec_inc = 0; >

[PATCH] net: stmmac: Avoid sometimes uninitialized Clang warnings

2019-03-07 Thread Nathan Chancellor
When building with -Wsometimes-uninitialized, Clang warns: drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:495:3: warning: variable 'ns' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:495:3: warning: variable