From: kernel test robot <lkp@intel.com>
To: Geliang Tang <geliangtang@xiaomi.com>
Cc: 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 03:38:41 +0800 [thread overview]
Message-ID: <202108040338.dZJC1W85-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2621 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-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# 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
make W=1 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: In function 'fill_remote_addresses_vec':
>> net/mptcp/pm_netlink.c:435:23: warning: variable 'pernet' set but not used [-Wunused-but-set-variable]
435 | struct pm_nl_pernet *pernet;
| ^~~~~~
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: 42170 bytes --]
next reply other threads:[~2021-08-03 19:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 19:38 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
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=202108040338.dZJC1W85-lkp@intel.com \
--to=lkp@intel.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 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).