linux/drivers
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
..
accessibility
acpi Driver core/kobject patches for 5.2-rc1 2019-05-07 13:01:40 -07:00
amba
android Char/Misc patches for 5.2-rc1 - part 2 2019-05-07 13:39:22 -07:00
ata ahci: qoriq: add ls1028a platforms support 2019-04-09 08:16:43 -06:00
atm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-04-25 23:52:29 -04:00
auxdisplay
base Driver core/kobject patches for 5.2-rc1 2019-05-07 13:01:40 -07:00
bcma
block Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
bluetooth Bluetooth: hci_qca: Rename STATE_<flags> to QCA_<flags> 2019-05-05 19:34:00 +02:00
bus
cdrom Revert "block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers" 2019-04-12 13:35:27 -06:00
char Some minor cleanups for the IPMI driver. 2019-05-08 10:34:17 -07:00
clk Merge branch 'clk-parent-rewrite-1' into clk-next 2019-05-07 11:46:13 -07:00
clocksource Kbuild updates for v5.2 2019-05-08 12:25:12 -07:00
connector
counter counter: add FlexTimer Module Quadrature decoder counter driver 2019-04-25 21:33:41 +02:00
cpufreq Printk changes for 5.2 2019-05-07 09:18:12 -07:00
cpuidle cpuidle: Export the next timer expiration for CPUs 2019-04-10 00:32:34 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-05-06 20:15:06 -07:00
dax dax: make use of ->free_inode() 2019-05-01 22:43:26 -04:00
dca
devfreq PM / devfreq: add tracing for scheduling work 2019-04-16 09:29:18 +09:00
dio
dma dmaengine updates for v5.2-rc1 2019-05-09 08:51:45 -07:00
dma-buf drm pull request for 5.2 2019-05-08 21:35:19 -07:00
edac Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-06 19:54:57 -07:00
eisa
extcon Char/Misc patches for 5.2-rc1 - part 2 2019-05-07 13:39:22 -07:00
firewire stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
firmware Char/Misc patches for 5.2-rc1 - part 2 2019-05-07 13:39:22 -07:00
fmc
fpga
fsi
gnss Char/Misc patches for 5.2-rc1 - part 2 2019-05-07 13:39:22 -07:00
gpio Pin control changes for v5.2: 2019-05-08 10:23:54 -07:00
gpu drm pull request for 5.2 2019-05-08 21:35:19 -07:00
hid stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
hsi
hv Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup() 2019-04-13 09:36:35 -04:00
hwmon stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
hwspinlock
hwtracing Char/Misc patches for 5.2-rc1 - part 2 2019-05-07 13:39:22 -07:00
i2c Merge branch 'i2c/for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2019-05-09 14:41:55 -07:00
i3c * Fix a shift wrap bug in the core 2019-05-07 08:50:40 -07:00
ide ide: officially deprecated the legacy IDE driver 2019-05-08 16:47:23 -07:00
idle
iio Staging / IIO driver patches for 5.2-rc1 2019-05-07 13:31:29 -07:00
infiniband 5.2 Merge Window pull request 2019-05-09 09:02:46 -07:00
input *: convert stream-like files from nonseekable_open -> stream_open 2019-05-06 17:46:41 +03:00
interconnect
iommu drm-misc-next for v5.2: 2019-04-24 10:12:50 +10:00
ipack
irqchip Driver core/kobject patches for 5.2-rc1 2019-05-07 13:01:40 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
leds LED updates for 5.2-rc1. 2019-05-07 18:02:51 -07:00
lightnvm lightnvm: pblk: fix crash in pblk_end_partial_read due to multipage bvecs 2019-04-10 12:17:01 -06:00
macintosh
mailbox
mcb
md for-5.2/block-20190507 2019-05-07 18:14:36 -07:00
media drm pull request for 5.2 2019-05-08 21:35:19 -07:00
memory
memstick MMC core: 2019-05-07 12:56:19 -07:00
message
mfd dmaengine updates for v5.2-rc1 2019-05-09 08:51:45 -07:00
misc powerpc updates for 5.2 2019-05-10 05:29:27 -07:00
mmc MMC core: 2019-05-07 12:56:19 -07:00
mtd Remove Mysterious Macro Intended to Obscure Weird Behaviours (mmiowb()) 2019-05-06 16:57:52 -07:00
mux
net net: ethernet: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
ntb
nubus
nvdimm for-5.2/block-20190507 2019-05-07 18:14:36 -07:00
nvme SCSI misc on 20190507 2019-05-08 10:12:46 -07:00
nvmem nvmem: core: add NVMEM_SYSFS Kconfig 2019-04-25 19:44:33 +02:00
of of_net: remove nvmem-mac-address property 2019-05-10 15:14:29 -07:00
opp OPP: Introduce dev_pm_opp_find_freq_ceil_by_volt() 2019-04-10 12:13:31 +05:30
oprofile
parisc parisc: Skip registering LED when running in QEMU 2019-05-03 23:47:39 +02:00
parport DMA mapping updates for 5.2 2019-05-09 08:40:55 -07:00
pci stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
pcmcia
perf perf/arm-ccn: Clean up CPU hotplug handling 2019-04-23 12:29:37 +01:00
phy USB/PHY patches for 5.2-rc1 2019-05-08 10:03:52 -07:00
pinctrl pinctrl: mcp23s08: Do not complain about unsupported params 2019-05-07 11:47:14 +02:00
platform *: convert stream-like files from nonseekable_open -> stream_open 2019-05-06 17:46:41 +03:00
pnp treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively 2019-04-09 14:19:06 +02:00
power Power Supply Fixes for 5.1 cycle 2019-05-01 14:57:23 -07:00
powercap
pps
ps3
ptp ptp_qoriq: fix NULL access if ptp dt node missing 2019-05-09 09:19:26 -07:00
pwm We have a couple new features and changes in the core clk framework this time 2019-05-09 14:50:09 -07:00
rapidio
ras RAS/CEC: Increment cec_entered under the mutex lock 2019-04-20 12:16:52 +02:00
regulator Merge branch 'regulator-5.2' into regulator-next 2019-05-06 22:52:14 +09:00
remoteproc
reset drm/tegra: Changes for v5.2-rc1 2019-04-24 10:30:45 +10:00
rpmsg
rtc RTC for 5.2 2019-05-09 14:46:33 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
sbus docs: sparc: convert to ReST 2019-05-08 17:13:35 -07:00
scsi SCSI misc on 20190507 2019-05-08 10:12:46 -07:00
sfi
sh
siox
slimbus slimbus: fix a potential NULL pointer dereference in of_qcom_slim_ngd_register 2019-04-25 22:23:06 +02:00
sn
soc soc: sunxi: Fix missing dependency on REGMAP_MMIO 2019-04-30 17:55:08 +02:00
soundwire soundwire: add a blank line between functions 2019-05-02 17:17:51 +02:00
spi dmaengine updates for v5.2-rc1 2019-05-09 08:51:45 -07:00
spmi
ssb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
staging drm pull request for 5.2 2019-05-08 21:35:19 -07:00
target SCSI misc on 20190507 2019-05-08 10:12:46 -07:00
tc
tee
thermal ACPICA: Rename nameseg length macro/define for clarity 2019-04-09 11:24:48 +02:00
thunderbolt Char/Misc patches for 5.2-rc1 - part 2 2019-05-07 13:39:22 -07:00
tty dmaengine updates for v5.2-rc1 2019-05-09 08:51:45 -07:00
uio
usb drm pull request for 5.2 2019-05-08 21:35:19 -07:00
uwb
vfio Make anon_inodes unconditional 2019-04-19 14:03:11 +02:00
vhost vhost: reject zero size iova range 2019-04-10 22:45:38 -07:00
video DMA mapping updates for 5.2 2019-05-09 08:40:55 -07:00
virt virt: vbox: Sanity-check parameter types for hgcm-calls coming from userspace 2019-04-25 21:52:40 +02:00
virtio
visorbus
vlynq
vme
w1 Char/Misc patches for 5.2-rc1 - part 2 2019-05-07 13:39:22 -07:00
watchdog stream_open related patches for Linux 5.2 2019-05-07 12:15:13 -07:00
xen Merge branch 'stable/for-linus-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb 2019-05-07 18:45:27 -07:00
zorro
Kconfig counter: Introduce the Generic Counter interface 2019-04-25 21:33:37 +02:00
Makefile counter: Introduce the Generic Counter interface 2019-04-25 21:33:37 +02:00