linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [mptcp:export 23/36] net/mptcp/pm_netlink.c:435:23: warning: variable 'pernet' set but not used
@ 2021-08-03 19:38 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-03 19:38 UTC (permalink / raw)
  To: Geliang Tang
  Cc: kbuild-all, mptcp, linux-kernel, Matthieu Baerts, Mat Martineau

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [mptcp:export 23/36] net/mptcp/pm_netlink.c:435:23: warning: variable 'pernet' set but not used
@ 2021-08-03 22:52 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-03 22:52 UTC (permalink / raw)
  To: Geliang Tang
  Cc: clang-built-linux, kbuild-all, mptcp, linux-kernel,
	Matthieu Baerts, Mat Martineau

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-03 22:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 19:38 [mptcp:export 23/36] net/mptcp/pm_netlink.c:435:23: warning: variable 'pernet' set but not used kernel test robot
2021-08-03 22:52 kernel test robot

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).