No description
Find a file
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
arch powerpc: tsi108: support of_get_mac_address new ERR_PTR error 2019-05-05 21:47:07 -07:00
block
certs
crypto
Documentation Documentation: net: dsa: sja1105: Add info about supported traffic modes 2019-05-05 21:52:42 -07:00
drivers net: usb: smsc: fix warning reported by kbuild test robot 2019-05-07 12:22:47 -07:00
fs
include net: dsa: sja1105: Add support for traffic through standalone ports 2019-05-05 21:52:42 -07:00
init
ipc
kernel
lib
LICENSES
mm
net net: dsa: support of_get_mac_address new ERR_PTR error 2019-05-07 12:22:47 -07:00
samples
scripts kbuild: tolerate missing pahole when generating BTF 2019-05-06 10:18:47 +02:00
security
sound
tools Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2019-05-07 09:29:16 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.