kernel_optimize_test/drivers/net
Nathan Chancellor 8c3bf9b62b net: qla3xxx: Remove overflowing shift statement
Clang currently warns:

drivers/net/ethernet/qlogic/qla3xxx.c:384:24: warning: signed shift
result (0xF00000000) requires 37 bits to represent, but 'int' only has
32 bits [-Wshift-overflow]
                    ((ISP_NVRAM_MASK << 16) | qdev->eeprom_cmd_data));
                      ~~~~~~~~~~~~~~ ^  ~~
1 warning generated.

The warning is certainly accurate since ISP_NVRAM_MASK is defined as
(0x000F << 16) which is then shifted by 16, resulting in 64424509440,
well above UINT_MAX.

Given that this is the only location in this driver where ISP_NVRAM_MASK
is shifted again, it seems likely that ISP_NVRAM_MASK was originally
defined without a shift and during the move of the shift to the
definition, this statement wasn't properly removed (since ISP_NVRAM_MASK
is used in the statenent right above this). Only the maintainers can
confirm this since this statment has been here since the driver was
first added to the kernel.

Link: https://github.com/ClangBuiltLinux/linux/issues/127
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-17 21:52:40 -07:00
..
appletalk
arcnet
bonding
caif
can
dsa net: dsa: bcm_sf2: Call setup during switch resume 2018-10-11 15:19:54 -07:00
ethernet net: qla3xxx: Remove overflowing shift statement 2018-10-17 21:52:40 -07:00
fddi
fjes
hamradio yam: fix a missing-check bug 2018-10-05 11:54:55 -07:00
hippi
hyperv
ieee802154
ipvlan
netdevsim
phy net: phy: sfp: remove sfp_mutex's definition 2018-10-11 12:10:06 -07:00
plip
ppp
slip
team team: Forbid enslaving team device to itself 2018-10-04 13:55:40 -07:00
usb qmi_wwan: Added support for Gemalto's Cinterion ALASxx WWAN interface 2018-10-10 22:57:23 -07:00
vmxnet3
wan
wimax
wireless MMC core: 2018-10-12 12:57:05 +02:00
xen-netback
dummy.c
eql.c
geneve.c geneve, vxlan: Don't set exceptions if skb->len < mtu 2018-10-17 21:51:13 -07:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c
virtio_net.c
vrf.c
vsockmon.c
vxlan.c geneve, vxlan: Don't set exceptions if skb->len < mtu 2018-10-17 21:51:13 -07:00
xen-netfront.c