kernel_optimize_test/drivers
Nathan Chancellor 1f5d861f7f net: stmmac: Avoid one more sometimes uninitialized Clang warning
When building with -Wsometimes-uninitialized, Clang warns:

drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:111:2: error: variable
'ns' is used uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:111:2: error: variable
'ns' is used uninitialized whenever '&&' condition is false
[-Werror,-Wsometimes-uninitialized]

Clang is concerned with the use of stmmac_do_void_callback (which
stmmac_get_systime wraps), as it may fail to initialize these values if
the if condition was ever false (meaning the callback doesn't exist).
It's not wrong because the callback is what initializes ns. While it's
unlikely that the callback is going to disappear at some point and make
that condition false, we can easily avoid this warning by zero
initializing the variable.

Link: https://github.com/ClangBuiltLinux/linux/issues/384
Fixes: df10317085 ("net: stmmac: Avoid sometimes uninitialized Clang warnings")
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-08 23:20:22 -08:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base regmap: Changes for v5.1 2019-03-04 19:16:09 -08:00
bcma
block
bluetooth Bluetooth: mediatek: add support for MediaTek MT7663U and MT7668U UART devices 2019-03-02 19:51:23 +01:00
bus Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-03-05 09:09:55 -08:00
cdrom
char Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-03-05 09:09:55 -08:00
clk
clocksource
connector connector: fix unsafe usage of ->real_parent 2019-03-08 15:06:38 -08:00
cpufreq
cpuidle
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-03-05 09:09:55 -08:00
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware
fmc
fpga
fsi
gnss
gpio Merge branch 'spi-5.1' into spi-next 2019-03-04 15:32:51 +00:00
gpu
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c
i3c - Add a /* fall-through */ comment in the dw-i3c-master driver 2019-03-04 19:05:02 -08:00
ide
idle
iio
infiniband
input
iommu
ipack
irqchip
isdn isdn: isdnloop: fix pointer dereference bug 2019-03-07 09:25:52 -08:00
leds LED updates for 5.1-rc1 2019-03-04 19:33:04 -08:00
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd
misc
mmc
mtd spi: Updates for v5.1 2019-03-04 19:23:56 -08:00
mux
net net: stmmac: Avoid one more sometimes uninitialized Clang warning 2019-03-08 23:20:22 -08:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp
oprofile
parisc
parport
pci
pcmcia
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator regulator: mc13xxx: Constify regulator_ops variables 2019-03-04 00:01:08 +00:00
remoteproc
reset
rpmsg
rtc
s390 s390 updates for the 5.1 merge window 2019-03-05 11:13:10 -08:00
sbus
scsi SCSI fixes on 20190302 2019-03-02 11:39:54 -08:00
sfi
sh
siox
slimbus
sn
soc Here's the main MIPS pull request for v5.1: 2019-03-05 11:28:25 -08:00
soundwire
spi Merge branch 'spi-5.1' into spi-next 2019-03-04 15:32:51 +00:00
spmi
ssb
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-03-05 08:26:13 -08:00
target
tc
tee
thermal
thunderbolt
tty
uio
usb
uwb
vfio
vhost vhost: silence an unused-variable warning 2019-03-08 15:17:03 -08:00
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile