linux-stable/arch/powerpc/sysdev
Petr Štetiar 1be9131453 powerpc: tsi108: 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: ea168cdf12 ("powerpc: tsi108: 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
..
ge
xics powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00
xive powerpc/xive: add OPAL extensions for the XIVE native exploitation support 2019-04-11 15:31:41 +10:00
6xx-suspend.S powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU 2019-02-23 22:31:40 +11:00
cpm1.c powerpc: remove unnecessary inclusion of asm/tlbflush.h 2018-07-30 22:48:20 +10:00
cpm2.c
cpm2_pic.c
cpm2_pic.h
cpm_common.c powerpc/cpm1: fix compilation error with CONFIG_PPC_EARLY_DEBUG_CPM 2018-08-10 22:12:33 +10:00
cpm_gpio.c powerpc: cpm_gpio: Remove owner assignment from platform_driver 2018-06-03 20:43:35 +10:00
dart.h
dart_iommu.c memblock: memblock_phys_alloc(): don't panic 2019-03-12 10:04:01 -07:00
dcr-low.S
dcr.c
ehv_pic.c
fsl_85xx_cache_ctlr.h
fsl_85xx_cache_sram.c powerpc: don't use ioremap_prot() nor __ioremap() unless really needed. 2018-10-14 18:04:09 +11:00
fsl_85xx_l2ctlr.c
fsl_gtm.c
fsl_lbc.c
fsl_mpic_err.c powerpc/mpic: Pass first free vector number to mpic_setup_error_int() 2018-07-19 21:58:09 +10:00
fsl_mpic_timer_wakeup.c
fsl_msi.c
fsl_msi.h
fsl_pci.c powerpc/dma: trim the fat from <asm/dma-mapping.h> 2019-02-18 22:41:04 +11:00
fsl_pci.h
fsl_pmc.c
fsl_rcpm.c
fsl_rio.c
fsl_rio.h powerpc/fsl-rio: fix spelling mistake "reserverd" -> "reserved" 2018-12-21 20:45:15 -06:00
fsl_rmu.c cross-tree: phase out dma_zalloc_coherent() 2019-01-08 07:58:37 -05:00
fsl_soc.c
fsl_soc.h
grackle.c
i8259.c
indirect_pci.c
ipic.c powerpc/ipic: drop unused functions 2019-01-14 20:39:27 +11:00
ipic.h
Kconfig powerpc: remove redundant 'default n' from Kconfig-s 2018-10-13 22:21:25 +11:00
Makefile powerpc: change CONFIG_6xx to CONFIG_PPC_BOOK3S_32 2018-11-26 22:33:37 +11:00
micropatch.c
mmio_nvram.c
mpc5xxx_clocks.c
mpic.c powerpc/mpic: Pass first free vector number to mpic_setup_error_int() 2018-07-19 21:58:09 +10:00
mpic.h
mpic_msgr.c powerpc: Fix size calculation using resource_size() 2018-08-10 22:12:33 +10:00
mpic_msi.c
mpic_timer.c
mpic_u3msi.c
msi_bitmap.c treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
of_rtc.c
pmi.c
rtc_cmos_setup.c
scom.c powerpc/scom: Return NULL instead of 0 2018-11-25 17:11:21 +11:00
simple_gpio.c
simple_gpio.h
tsi108_dev.c powerpc: tsi108: fix similar warning reported by kbuild test robot 2019-05-10 15:14:29 -07:00
tsi108_pci.c
udbg_memcons.c
xilinx_intc.c
xilinx_pci.c