drivers/net/ethernet/micrel/ks8851.c:429:3: note: in expansion of macro 'memcpy'
From: kbuild test robot
Date: Wed May 08 2019 - 22:16:15 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ef75bd71c5d31dc17ae41ff8bec92630a3037d69
commit: a51645f70f6384ae3329551750f7f502cb8de5fc net: ethernet: support of_get_mac_address new ERR_PTR error
date: 31 hours ago
config: i386-randconfig-c0-05090856 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout a51645f70f6384ae3329551750f7f502cb8de5fc
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/string.h:3:0,
from include/linux/string.h:20,
from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from include/linux/interrupt.h:8,
from drivers/net/ethernet/micrel/ks8851.c:16:
drivers/net/ethernet/micrel/ks8851.c: In function 'ks8851_probe':
arch/x86/include/asm/string_32.h:182:25: warning: argument 2 null where non-null expected [-Wnonnull]
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/micrel/ks8851.c:429:3: note: in expansion of macro 'memcpy'
memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
^~~~~~
arch/x86/include/asm/string_32.h:182:25: note: in a call to built-in function '__builtin_memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/micrel/ks8851.c:429:3: note: in expansion of macro 'memcpy'
memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
^~~~~~
--
In file included from arch/x86/include/asm/string.h:3:0,
from include/linux/string.h:20,
from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from include/linux/interrupt.h:8,
from drivers/net/ethernet/micrel/ks8851_mll.c:25:
drivers/net/ethernet/micrel/ks8851_mll.c: In function 'ks8851_probe':
arch/x86/include/asm/string_32.h:182:25: warning: argument 2 null where non-null expected [-Wnonnull]
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/micrel/ks8851_mll.c:1331:4: note: in expansion of macro 'memcpy'
memcpy(ks->mac_addr, mac, ETH_ALEN);
^~~~~~
arch/x86/include/asm/string_32.h:182:25: note: in a call to built-in function '__builtin_memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/micrel/ks8851_mll.c:1331:4: note: in expansion of macro 'memcpy'
memcpy(ks->mac_addr, mac, ETH_ALEN);
^~~~~~
vim +/memcpy +429 drivers/net/ethernet/micrel/ks8851.c
a9a8de21 drivers/net/ethernet/micrel/ks8851.c Ben Dooks 2011-11-21 411
a9a8de21 drivers/net/ethernet/micrel/ks8851.c Ben Dooks 2011-11-21 412 /**
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 413 * ks8851_init_mac - initialise the mac address
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 414 * @ks: The device structure
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 415 *
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 416 * Get or create the initial mac address for the device and then set that
566bd54b drivers/net/ethernet/micrel/ks8851.c Lukas Wunner 2017-12-18 417 * into the station address register. A mac address supplied in the device
566bd54b drivers/net/ethernet/micrel/ks8851.c Lukas Wunner 2017-12-18 418 * tree takes precedence. Otherwise, if there is an EEPROM present, then
7efd26d0 drivers/net/ethernet/micrel/ks8851.c Joe Perches 2012-07-12 419 * we try that. If no valid mac address is found we use eth_random_addr()
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 420 * to create a new one.
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 421 */
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 422 static void ks8851_init_mac(struct ks8851_net *ks)
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 423 {
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 424 struct net_device *dev = ks->netdev;
566bd54b drivers/net/ethernet/micrel/ks8851.c Lukas Wunner 2017-12-18 425 const u8 *mac_addr;
566bd54b drivers/net/ethernet/micrel/ks8851.c Lukas Wunner 2017-12-18 426
566bd54b drivers/net/ethernet/micrel/ks8851.c Lukas Wunner 2017-12-18 427 mac_addr = of_get_mac_address(ks->spidev->dev.of_node);
a51645f7 drivers/net/ethernet/micrel/ks8851.c Petr Åtetiar 2019-05-06 428 if (!IS_ERR(mac_addr)) {
566bd54b drivers/net/ethernet/micrel/ks8851.c Lukas Wunner 2017-12-18 @429 memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
566bd54b drivers/net/ethernet/micrel/ks8851.c Lukas Wunner 2017-12-18 430 ks8851_write_mac_addr(dev);
566bd54b drivers/net/ethernet/micrel/ks8851.c Lukas Wunner 2017-12-18 431 return;
566bd54b drivers/net/ethernet/micrel/ks8851.c Lukas Wunner 2017-12-18 432 }
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 433
a9a8de21 drivers/net/ethernet/micrel/ks8851.c Ben Dooks 2011-11-21 434 if (ks->rc_ccr & CCR_EEPROM) {
a9a8de21 drivers/net/ethernet/micrel/ks8851.c Ben Dooks 2011-11-21 435 ks8851_read_mac_addr(dev);
a9a8de21 drivers/net/ethernet/micrel/ks8851.c Ben Dooks 2011-11-21 436 if (is_valid_ether_addr(dev->dev_addr))
a9a8de21 drivers/net/ethernet/micrel/ks8851.c Ben Dooks 2011-11-21 437 return;
a9a8de21 drivers/net/ethernet/micrel/ks8851.c Ben Dooks 2011-11-21 438
a9a8de21 drivers/net/ethernet/micrel/ks8851.c Ben Dooks 2011-11-21 439 netdev_err(ks->netdev, "invalid mac address read %pM\n",
a9a8de21 drivers/net/ethernet/micrel/ks8851.c Ben Dooks 2011-11-21 440 dev->dev_addr);
a9a8de21 drivers/net/ethernet/micrel/ks8851.c Ben Dooks 2011-11-21 441 }
a9a8de21 drivers/net/ethernet/micrel/ks8851.c Ben Dooks 2011-11-21 442
7ce5d222 drivers/net/ethernet/micrel/ks8851.c Danny Kukawka 2012-02-15 443 eth_hw_addr_random(dev);
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 444 ks8851_write_mac_addr(dev);
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 445 }
3ba81f3e drivers/net/ks8851.c Ben Dooks 2009-07-16 446
:::::: The code at line 429 was first introduced by commit
:::::: 566bd54b067d5242043ce0560906bf4a2e3de289 net: ks8851: Support DT-provided MAC address
:::::: TO: Lukas Wunner <lukas@xxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip