From: kernel test robot <lkp@intel.com>
To: Geliang Tang <geliangtang@xiaomi.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
mptcp@lists.linux.dev, linux-kernel@vger.kernel.org,
Matthieu Baerts <matthieu.baerts@tessares.net>,
Mat Martineau <mathew.j.martineau@linux.intel.com>
Subject: [mptcp:export 23/36] net/mptcp/pm_netlink.c:435:23: warning: variable 'pernet' set but not used
Date: Wed, 4 Aug 2021 06:52:04 +0800 [thread overview]
Message-ID: <202108040651.7XWhROXB-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2836 bytes --]
tree: https://github.com/multipath-tcp/mptcp_net-next.git export
head: e68bd44ec0eea7d2f399c73430a9a3b642bd30aa
commit: 707ec42a2f6178b5e6c914f9a8c7e6bd50bfa9e2 [23/36] mptcp: remote addresses fullmesh
config: x86_64-randconfig-a012-20210803 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 4f71f59bf3d9914188a11d0c41bedbb339d36ff5)
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/multipath-tcp/mptcp_net-next/commit/707ec42a2f6178b5e6c914f9a8c7e6bd50bfa9e2
git remote add mptcp https://github.com/multipath-tcp/mptcp_net-next.git
git fetch --no-tags mptcp export
git checkout 707ec42a2f6178b5e6c914f9a8c7e6bd50bfa9e2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> net/mptcp/pm_netlink.c:435:23: warning: variable 'pernet' set but not used [-Wunused-but-set-variable]
struct pm_nl_pernet *pernet;
^
1 warning generated.
vim +/pernet +435 net/mptcp/pm_netlink.c
425
426 /* Fill all the remote addresses into the array addrs[],
427 * and return the array size.
428 */
429 static unsigned int fill_remote_addresses_vec(struct mptcp_sock *msk, bool fullmesh,
430 struct mptcp_addr_info *addrs)
431 {
432 struct sock *sk = (struct sock *)msk, *ssk;
433 struct mptcp_subflow_context *subflow;
434 struct mptcp_addr_info remote = { 0 };
> 435 struct pm_nl_pernet *pernet;
436 unsigned int subflows_max;
437 int i = 0;
438
439 pernet = net_generic(sock_net(sk), pm_nl_pernet_id);
440 subflows_max = mptcp_pm_get_subflows_max(msk);
441
442 /* Non-fullmesh endpoint, fill in the single entry
443 * corresponding to the primary MPC subflow remote address
444 */
445 if (!fullmesh) {
446 remote_address((struct sock_common *)sk, &remote);
447 msk->pm.subflows++;
448 addrs[i++] = remote;
449 } else {
450 mptcp_for_each_subflow(msk, subflow) {
451 ssk = mptcp_subflow_tcp_sock(subflow);
452 remote_address((struct sock_common *)ssk, &remote);
453 if (!lookup_address_in_vec(addrs, i, &remote) &&
454 msk->pm.subflows < subflows_max) {
455 msk->pm.subflows++;
456 addrs[i++] = remote;
457 }
458 }
459 }
460
461 return i;
462 }
463
---
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: 37461 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [mptcp:export 23/36] net/mptcp/pm_netlink.c:435:23: warning: variable 'pernet' set but not used
Date: Wed, 04 Aug 2021 06:52:04 +0800 [thread overview]
Message-ID: <202108040651.7XWhROXB-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2909 bytes --]
tree: https://github.com/multipath-tcp/mptcp_net-next.git export
head: e68bd44ec0eea7d2f399c73430a9a3b642bd30aa
commit: 707ec42a2f6178b5e6c914f9a8c7e6bd50bfa9e2 [23/36] mptcp: remote addresses fullmesh
config: x86_64-randconfig-a012-20210803 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 4f71f59bf3d9914188a11d0c41bedbb339d36ff5)
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/multipath-tcp/mptcp_net-next/commit/707ec42a2f6178b5e6c914f9a8c7e6bd50bfa9e2
git remote add mptcp https://github.com/multipath-tcp/mptcp_net-next.git
git fetch --no-tags mptcp export
git checkout 707ec42a2f6178b5e6c914f9a8c7e6bd50bfa9e2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> net/mptcp/pm_netlink.c:435:23: warning: variable 'pernet' set but not used [-Wunused-but-set-variable]
struct pm_nl_pernet *pernet;
^
1 warning generated.
vim +/pernet +435 net/mptcp/pm_netlink.c
425
426 /* Fill all the remote addresses into the array addrs[],
427 * and return the array size.
428 */
429 static unsigned int fill_remote_addresses_vec(struct mptcp_sock *msk, bool fullmesh,
430 struct mptcp_addr_info *addrs)
431 {
432 struct sock *sk = (struct sock *)msk, *ssk;
433 struct mptcp_subflow_context *subflow;
434 struct mptcp_addr_info remote = { 0 };
> 435 struct pm_nl_pernet *pernet;
436 unsigned int subflows_max;
437 int i = 0;
438
439 pernet = net_generic(sock_net(sk), pm_nl_pernet_id);
440 subflows_max = mptcp_pm_get_subflows_max(msk);
441
442 /* Non-fullmesh endpoint, fill in the single entry
443 * corresponding to the primary MPC subflow remote address
444 */
445 if (!fullmesh) {
446 remote_address((struct sock_common *)sk, &remote);
447 msk->pm.subflows++;
448 addrs[i++] = remote;
449 } else {
450 mptcp_for_each_subflow(msk, subflow) {
451 ssk = mptcp_subflow_tcp_sock(subflow);
452 remote_address((struct sock_common *)ssk, &remote);
453 if (!lookup_address_in_vec(addrs, i, &remote) &&
454 msk->pm.subflows < subflows_max) {
455 msk->pm.subflows++;
456 addrs[i++] = remote;
457 }
458 }
459 }
460
461 return i;
462 }
463
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37461 bytes --]
next reply other threads:[~2021-08-03 22:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 22:52 kernel test robot [this message]
2021-08-03 22:52 ` [mptcp:export 23/36] net/mptcp/pm_netlink.c:435:23: warning: variable 'pernet' set but not used kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-08-03 19:38 kernel test robot
2021-08-03 19:38 ` 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=202108040651.7XWhROXB-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=geliangtang@xiaomi.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathew.j.martineau@linux.intel.com \
--cc=matthieu.baerts@tessares.net \
--cc=mptcp@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.