linux/drivers/net/wireless
Petr Štetiar 1b9705d971 net: wireless: mt76: 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: d31a36b5f4 ("net: wireless: 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
..
admtek
ath Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
atmel at76c50x-usb: Don't register led_trigger if usb_register_driver failed 2019-04-25 19:52:14 +03:00
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
cisco Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-12-27 13:53:32 -08:00
intel Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
intersil Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
marvell wireless-drivers-next patches for 5.2 2019-05-05 10:20:53 -07:00
mediatek net: wireless: mt76: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
quantenna qtnfmac: modify debugfs to support multiple cards 2019-04-26 14:53:13 +03:00
ralink net: wireless: support of_get_mac_address new ERR_PTR error 2019-05-05 21:47:07 -07:00
realtek rtw88: add license for Makefile 2019-05-03 15:06:12 +03:00
rsi rsi: miscallaneous changes for 9116 and common 2019-04-25 19:44:29 +03:00
st net: cw1200: fix a NULL pointer dereference 2019-04-25 19:40:09 +03:00
ti wireless-drivers-next patches for 5.2 2019-05-05 10:20:53 -07:00
zydas zd1211rw: use struct_size() helper 2019-04-25 19:49:50 +03:00
Kconfig mac80211-next: rtnetlink wifi simulation device 2018-12-05 15:31:31 +01:00
mac80211_hwsim.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-05-07 22:03:58 -07:00
mac80211_hwsim.h mac80211_hwsim: allow configurable cipher types 2018-11-09 11:36:15 +01:00
Makefile mac80211-next: rtnetlink wifi simulation device 2018-12-05 15:31:31 +01:00
ray_cs.c ray_cs: use remove_proc_subtree to simplify procfs code 2019-04-25 19:38:52 +03:00
ray_cs.h
rayctl.h
rndis_wlan.c rndis_wlan: use struct_size() helper 2019-04-25 19:37:44 +03:00
virt_wifi.c virt_wifi: Remove REGULATORY_WIPHY_SELF_MANAGED 2019-02-11 17:10:48 +01:00
wl3501_cs.c
wl3501.h