linux/drivers/net/usb
Petr Štetiar 5503a6889f net: usb: smsc: fix warning reported by kbuild test robot
This patch fixes following 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.

Fixes: adfb3cb2c5 ("net: usb: 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>
Reviewed-by: Woojung Huh <woojung.huh@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-07 12:22:47 -07:00
..
aqc111.c net: usb: aqc111: Extend HWID table by QNAP device 2019-03-26 11:19:42 -07:00
aqc111.h net: usb: aqc111: Add support for wake on LAN by MAGIC packet 2018-11-27 15:46:07 -08:00
asix_common.c asix: Check for supported Wake-on-LAN modes 2018-09-29 11:31:29 -07:00
asix_devices.c net: usb: asix: ax88772_bind return error when hw_reset fail 2019-01-24 22:33:11 -08:00
asix.h
ax88172a.c
ax88179_178a.c ax88179_178a: Check for supported Wake-on-LAN modes 2018-09-29 11:31:29 -07:00
catc.c net: usb: Mark expected switch fall-throughs 2018-06-30 20:47:16 +09:00
cdc_eem.c net: cdc_eem: clean up bind error path 2018-03-07 15:39:27 -05:00
cdc_ether.c net: usb: aqc111: Extend HWID table by QNAP device 2019-03-26 11:19:42 -07:00
cdc_mbim.c ipv6: Move ipv6 stubs to a separate header file 2019-03-29 10:53:45 -07:00
cdc_ncm.c net: cdc_ncm: remove set but not used variable 'ctx' 2018-10-12 09:45:36 -07:00
cdc_subset.c
cdc-phonet.c net: usb: cdc-phonet: use struct_size() in alloc_netdev() 2019-02-08 22:57:27 -08:00
ch9200.c
cx82310_eth.c
dm9601.c
gl620a.c
hso.c USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data 2018-12-12 15:41:10 -08:00
huawei_cdc_ncm.c
int51x1.c
ipheth.c usbnet: ipheth: Remove unnecessary NULL pointer check 2019-05-03 23:59:31 -04:00
kalmia.c net: kalmia: clean up bind error path 2018-03-07 15:39:27 -05:00
kaweth.c net: usb: kaweth: use irqsave() in USB's complete callback 2018-06-22 13:57:45 +09:00
Kconfig net: Don't default Aquantia USB driver to 'y' 2018-11-29 16:01:34 -08:00
lan78xx.c net: phy: fixed-phy: Drop GPIO from fixed_phy_add() 2019-02-04 18:33:36 -08:00
lan78xx.h net: lan78xx: Switch to SPDX identifier 2018-09-05 22:20:45 -07:00
lg-vl600.c net: drivers/net: Remove unnecessary skb_copy_expand OOM messages 2018-03-15 14:28:03 -04:00
Makefile net: usb: aqc111: Driver skeleton for Aquantia AQtion USB to 5GbE 2018-11-27 15:46:06 -08:00
mcs7830.c
net1080.c
pegasus.c net: usb: pegasus: Mark expected switch fall-through 2019-02-08 11:54:06 -08:00
pegasus.h
plusb.c
qmi_wwan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-05-02 22:14:21 -04:00
r8152.c r8152: sync sa_family with the media type of network device 2019-04-22 22:14:43 -07:00
rndis_host.c
rtl8150.c net: usb: rtl8150: mark expected switch fall-through 2019-02-08 11:54:27 -08:00
sierra_net.c
smsc75xx.c net: usb: smsc: fix warning reported by kbuild test robot 2019-05-07 12:22:47 -07:00
smsc75xx.h
smsc95xx.c net: usb: smsc: fix warning reported by kbuild test robot 2019-05-07 12:22:47 -07:00
smsc95xx.h
sr9700.c drivers: net: Remove unnecessary semicolon 2019-03-01 23:13:49 -08:00
sr9700.h
sr9800.c sr9800: Check for supported Wake-on-LAN modes 2018-09-29 11:31:29 -07:00
sr9800.h
usbnet.c net: usbnet: make driver_info const 2018-10-02 22:22:46 -07:00
zaurus.c