[mptcp:export 23/36] net/mptcp/pm_netlink.c:435:23: warning: variable 'pernet' set but not used

From: kernel test robot
Date: Tue Aug 03 2021 - 18:53:07 EST


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@xxxxxxxxx>

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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip