linux_dsm_epyc7002/drivers/net/ethernet
Petr Štetiar 2d2924af96 net: ethernet: fix similar warning reported by kbuild test robot
This patch fixes following (similar) warning reported by kbuild test robot:

 In function ‘memcpy’,
  inlined from ‘smsc75xx_init_mac_address’ at drivers/net/usb/smsc75xx.c:778:3,
  inlined from ‘smsc75xx_bind’ at drivers/net/usb/smsc75xx.c:1501:2:
  ./include/linux/string.h:355:9: warning: argument 2 null where non-null expected [-Wnonnull]
  return __builtin_memcpy(p, q, size);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  drivers/net/usb/smsc75xx.c: In function ‘smsc75xx_bind’:
  ./include/linux/string.h:355:9: note: in a call to built-in function ‘__builtin_memcpy’

I've replaced the offending memcpy with ether_addr_copy, because I'm
100% sure, that of_get_mac_address can't return NULL as it returns valid
pointer or ERR_PTR encoded value, nothing else.

I'm hesitant to just change IS_ERR into IS_ERR_OR_NULL check, as this
would make the warning disappear also, but it would be confusing to
check for impossible return value just to make a compiler happy.

I'm now changing all occurencies of memcpy to ether_addr_copy after the
of_get_mac_address call, as it's very likely, that we're going to get
similar reports from kbuild test robot in the future.

Fixes: a51645f70f ("net: ethernet: support of_get_mac_address new ERR_PTR error")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-10 15:14:29 -07:00
..
3com
8390
adaptec
aeroflex Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
agere
alacritech drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
allwinner net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
alteon
altera net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
amazon Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
amd amd-xgbe: Mark expected switch fall-throughs 2019-04-26 11:28:47 -04:00
apm
apple
aquantia net: aquantia: fix undefined devm_hwmon_device_register_with_info reference 2019-05-09 09:48:44 -07:00
arc net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
atheros Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
aurora net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
brocade
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-05-07 17:22:09 -07:00
calxeda
cavium net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
chelsio Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-05-07 17:22:09 -07:00
cirrus
cisco net: move skb->xmit_more hint to softnet data 2019-04-01 18:35:02 -07:00
cortina net: gemini: remove unnecessary assert 2019-04-18 17:06:15 -07:00
davicom net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
dec
dlink
emulex net: move skb->xmit_more hint to softnet data 2019-04-01 18:35:02 -07:00
ezchip net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
faraday
freescale net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
fujitsu
hisilicon net: hns3: remove redundant assignment of l2_hdr to itself 2019-05-08 09:44:37 -07:00
hp
huawei net: move skb->xmit_more hint to softnet data 2019-04-01 18:35:02 -07:00
i825xx parisc: Tune LASI LAN for QEMU 2019-05-03 23:47:38 +02:00
ibm net/ibmvnic: Update carrier state after link state change 2019-05-10 15:12:09 -07:00
intel Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
marvell net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
mediatek net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
mellanox 5.2 Merge Window pull request 2019-05-09 09:02:46 -07:00
micrel net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
microchip
moxa
mscc ocelot: Clean up stats update deferred work 2019-04-16 21:43:53 -07:00
myricom drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
natsemi
neterion Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
netronome nfp: add missing kdoc 2019-05-09 16:41:46 -07:00
ni
nuvoton
nvidia
nxp net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
oki-semi
packetengines
pasemi net: pasemi: remove set but not used variable 'cpyhdr' 2019-04-04 17:36:23 -07:00
qlogic Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
qualcomm net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
rdc net: move skb->xmit_more hint to softnet data 2019-04-01 18:35:02 -07:00
realtek r8169: add rtl8168g_set_pause_thresholds 2019-05-05 21:58:36 -07:00
renesas net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
rocker ipv4: Flag fib_info with a fib_nh using IPv6 gateway 2019-04-08 15:22:41 -07:00
samsung net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
sgi
silan net/ethernet/silan/sc92031: Remove stale comment about mmiowb() 2019-04-08 12:09:18 +01:00
sis
smsc
socionext net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
stmicro dwmac4_prog_mtl_tx_algorithms() missing write operation 2019-05-09 09:20:32 -07:00
sun net: remove 'fallback' argument from dev->ndo_select_queue() 2019-03-20 11:18:55 -07:00
synopsys net: move skb->xmit_more hint to softnet data 2019-04-01 18:35:02 -07:00
tehuti
ti net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
toshiba
tundra
via drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
wiznet Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
xilinx net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c net: ethernet: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
Makefile
netx-eth.c