From: kernel test robot <lkp@intel.com>
To: Yajun Deng <yajun.deng@linux.dev>, davem@davemloft.net, kuba@kernel.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Yajun Deng <yajun.deng@linux.dev>
Subject: Re: [PATCH net-next 1/2] of: net: move nvmem_get_mac_address() into of_get_mac_addr_nvmem()
Date: Thu, 14 Oct 2021 03:16:04 +0800 [thread overview]
Message-ID: <202110140325.as3e3l71-lkp@intel.com> (raw)
In-Reply-To: <20211013082550.624-1-yajun.deng@linux.dev>
[-- Attachment #1: Type: text/plain, Size: 5081 bytes --]
Hi Yajun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Yajun-Deng/of-net-move-nvmem_get_mac_address-into-of_get_mac_addr_nvmem/20211013-162802
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git d1f24712a86abd04d82cf4b00fb4ab8ff2d23c8a
config: i386-buildonly-randconfig-r002-20211013 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a8c695542b2987eb9a203d5663a0740cb4725f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/10748c5429eced2d22c6cf10e8dcdef8a1a5c38d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yajun-Deng/of-net-move-nvmem_get_mac_address-into-of_get_mac_addr_nvmem/20211013-162802
git checkout 10748c5429eced2d22c6cf10e8dcdef8a1a5c38d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> net/core/of_net.c:66:6: error: unused variable 'ret' [-Werror,-Wunused-variable]
int ret;
^
1 error generated.
vim +/ret +66 net/core/of_net.c
3eb46a1da78dff drivers/of/of_net.c Sergei Shtylyov 2015-03-18 59
83216e3988cd19 drivers/of/of_net.c Michael Walle 2021-04-12 60 static int of_get_mac_addr_nvmem(struct device_node *np, u8 *addr)
d01f449c008a3f drivers/of/of_net.c Petr Štetiar 2019-05-03 61 {
d01f449c008a3f drivers/of/of_net.c Petr Štetiar 2019-05-03 62 struct platform_device *pdev = of_find_device_by_node(np);
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 63 struct nvmem_cell *cell;
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 64 const void *mac;
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 65 size_t len;
83216e3988cd19 drivers/of/of_net.c Michael Walle 2021-04-12 @66 int ret;
d01f449c008a3f drivers/of/of_net.c Petr Štetiar 2019-05-03 67
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 68 /* Try lookup by device first, there might be a nvmem_cell_lookup
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 69 * associated with a given device.
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 70 */
10748c5429eced net/core/of_net.c Yajun Deng 2021-10-13 71 if (pdev)
10748c5429eced net/core/of_net.c Yajun Deng 2021-10-13 72 cell = nvmem_cell_get(&pdev->dev, "mac-address");
10748c5429eced net/core/of_net.c Yajun Deng 2021-10-13 73 else
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 74 cell = of_nvmem_cell_get(np, "mac-address");
10748c5429eced net/core/of_net.c Yajun Deng 2021-10-13 75
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 76 if (IS_ERR(cell))
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 77 return PTR_ERR(cell);
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 78
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 79 mac = nvmem_cell_read(cell, &len);
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 80 nvmem_cell_put(cell);
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 81
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 82 if (IS_ERR(mac))
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 83 return PTR_ERR(mac);
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 84
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 85 if (len != ETH_ALEN || !is_valid_ether_addr(mac)) {
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 86 kfree(mac);
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 87 return -EINVAL;
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 88 }
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 89
10748c5429eced net/core/of_net.c Yajun Deng 2021-10-13 90 ether_addr_copy(addr, mac);
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 91 kfree(mac);
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 92
10748c5429eced net/core/of_net.c Yajun Deng 2021-10-13 93 if (pdev)
10748c5429eced net/core/of_net.c Yajun Deng 2021-10-13 94 put_device(&pdev->dev);
10748c5429eced net/core/of_net.c Yajun Deng 2021-10-13 95
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 96 return 0;
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 97 }
f10843e04a0752 drivers/of/of_net.c Michael Walle 2021-04-12 98
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37057 bytes --]
next prev parent reply other threads:[~2021-10-13 19:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 8:25 [PATCH net-next 1/2] of: net: move nvmem_get_mac_address() into of_get_mac_addr_nvmem() Yajun Deng
2021-10-13 19:16 ` kernel test robot [this message]
2021-10-15 10:00 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202110140325.as3e3l71-lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=yajun.deng@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).