[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202004051802.wQTCzw3s%lkp@intel.com>
Date: Sun, 5 Apr 2020 18:41:07 +0800
From: kbuild test robot <lkp@...el.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Matthieu Baerts <matthieu.baerts@...sares.net>,
Mat Martineau <mathew.j.martineau@...ux.intel.com>
Subject: net/mptcp/pm_netlink.c:98:22: warning: The scope of the variable
'skc' can be reduced. [variableScope]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4c205c84e249e0a91dcfabe461d77667ec9b2d05
commit: 01cacb00b35cb62b139f07d5f84bcf0eeda8eff6 mptcp: add netlink-based PM
date: 6 days ago
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@...el.com>
cppcheck warnings: (new ones prefixed by >>)
>> net/mptcp/pm_netlink.c:98:22: warning: The scope of the variable 'skc' can be reduced. [variableScope]
>> struct sock_common *skc;
^
vim +/skc +98 net/mptcp/pm_netlink.c
92
93 static bool lookup_subflow_by_saddr(const struct list_head *list,
94 struct mptcp_addr_info *saddr)
95 {
96 struct mptcp_subflow_context *subflow;
97 struct mptcp_addr_info cur;
> 98 struct sock_common *skc;
99
100 list_for_each_entry(subflow, list, node) {
101 skc = (struct sock_common *)mptcp_subflow_tcp_sock(subflow);
102
103 local_address(skc, &cur);
104 if (addresses_equal(&cur, saddr, false))
105 return true;
106 }
107
108 return false;
109 }
110
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists