linux_dsm_epyc7002/drivers/net/ethernet
Arnd Bergmann 047a013f8d chelsio: use BUG() instead of BUG_ON(1)
clang warns about possible bugs in a dead code branch after
BUG_ON(1) when CONFIG_PROFILE_ALL_BRANCHES is enabled:

 drivers/net/ethernet/chelsio/cxgb4/sge.c:479:3: error: variable 'buf_size' is used uninitialized whenever 'if'
      condition is false [-Werror,-Wsometimes-uninitialized]
                BUG_ON(1);
                ^~~~~~~~~
 include/asm-generic/bug.h:61:36: note: expanded from macro 'BUG_ON'
 #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                   ^~~~~~~~~~~~~~~~~~~
 include/linux/compiler.h:48:23: note: expanded from macro 'unlikely'
 #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 drivers/net/ethernet/chelsio/cxgb4/sge.c:482:9: note: uninitialized use occurs here
        return buf_size;
               ^~~~~~~~
 drivers/net/ethernet/chelsio/cxgb4/sge.c:479:3: note: remove the 'if' if its condition is always true
                BUG_ON(1);
                ^
 include/asm-generic/bug.h:61:32: note: expanded from macro 'BUG_ON'
 #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                               ^
 drivers/net/ethernet/chelsio/cxgb4/sge.c:459:14: note: initialize the variable 'buf_size' to silence this warning
        int buf_size;
                    ^
                     = 0

Use BUG() here to create simpler code that clang understands
correctly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-26 11:42:11 -07:00
..
3com 3c515: fix integer overflow warning 2019-03-19 15:07:49 -07:00
8390 mac8390: Fix mmio access size probe 2019-03-18 16:56:57 -07:00
adaptec
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon
amd
apm
apple
aquantia net: aquantia: fix rx checksum offload for UDP/TCP over IPv6 2019-03-18 16:59:35 -07:00
arc
atheros Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-24 12:06:19 -08:00
aurora
broadcom 5.1 Merge Window Pull Request 2019-03-09 15:53:03 -08:00
brocade
cadence net: macb: Add null check for PCLK and HCLK 2019-03-21 13:22:41 -07:00
calxeda
cavium net: thunder: fix a potential NULL pointer dereference 2019-03-11 13:34:31 -07:00
chelsio chelsio: use BUG() instead of BUG_ON(1) 2019-03-26 11:42:11 -07:00
cirrus
cisco enic: fix build warning without CONFIG_CPUMASK_OFFSTACK 2019-03-07 09:41:08 -08:00
cortina
davicom
dec
dlink
emulex
ezchip
faraday drivers: net: Remove unnecessary semicolon 2019-03-01 23:13:49 -08:00
freescale dpaa2-eth: Fix possible access beyond end of array 2019-03-20 16:28:13 -07:00
fujitsu net: fujitsu: fix a potential NULL pointer dereference 2019-03-12 14:48:35 -07:00
hisilicon net: hns3: fix for not calculating tx bd num correctly 2019-03-21 13:59:24 -07:00
hp
huawei
i825xx
ibm net: ibm: fix possible object reference leak 2019-03-23 21:21:24 -04:00
intel mm: replace all open encodings for NUMA_NO_NODE 2019-03-05 21:07:14 -08:00
marvell sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79 2019-03-04 11:31:25 -08:00
mediatek drivers: net: Remove unnecessary semicolon 2019-03-01 23:13:49 -08:00
mellanox mlxsw: core: mlxsw: core: avoid -Wint-in-bool-context warning 2019-03-19 13:26:03 -07:00
micrel net: ks8851: Deduplicate register macros 2019-03-20 12:43:52 -07:00
microchip lan743x: Fix TX Stall Issue 2019-03-13 13:41:46 -07:00
moxa
mscc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-03-04 13:26:15 -08:00
myricom
natsemi
neterion
netronome nfp: fix simple vNIC mailbox length 2019-03-07 11:00:21 -08:00
ni
nuvoton
nvidia
nxp
oki-semi pci-v5.1-changes 2019-03-09 14:57:08 -08:00
packetengines
pasemi
qlogic qlcnic: Avoid potential NULL pointer dereference 2019-03-15 11:55:53 -07:00
qualcomm
rdc
realtek r8169: fix cable re-plugging issue 2019-03-23 21:26:43 -04:00
renesas net: sh_eth: fix a missing check of of_get_phy_mode 2019-03-12 14:51:02 -07:00
rocker net: rocker: fix a potential NULL pointer dereference 2019-03-11 16:17:31 -07:00
samsung
seeq
sfc
sgi
silan
sis net: sis900: fix indentation issues, remove some spaces 2019-03-15 11:59:00 -07:00
smsc
socionext
stmicro net: stmmac: fix memory corruption with large MTUs 2019-03-19 13:30:30 -07:00
sun net: ethernet: sun: Zero initialize class in default case in niu_add_ethtool_tcam_entry 2019-03-08 15:26:21 -08:00
synopsys
tehuti
ti net: ethernet: ti: fix possible object reference leak 2019-03-23 21:21:24 -04:00
toshiba
tundra
via
wiznet
xilinx net: xilinx: fix possible object reference leak 2019-03-23 21:21:24 -04:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c net: lantiq: Do not use eth_change_mtu() 2019-02-24 17:35:42 -08:00
Makefile
netx-eth.c