From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: net/mptcp/options.c:203:3: warning: Assignment of function parameter has no effect outside the function.
Date: Thu, 19 Nov 2020 16:01:01 +0800 [thread overview]
Message-ID: <202011191657.upunpmcs-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5823 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Mat Martineau <mathew.j.martineau@linux.intel.com>
CC: Paolo Abeni <pabeni@redhat.com>
CC: Peter Krystad <peter.krystad@linux.intel.com>
CC: Florian Westphal <fw@strlen.de>
CC: Christoph Paasch <cpaasch@apple.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c2e7554e1b85935d962127efa3c2a76483b0b3b6
commit: 6d0060f600adfddaa43fefb96b6b12643331961e mptcp: Write MPTCP DSS headers to outgoing data packets
date: 10 months ago
:::::: branch date: 12 hours ago
:::::: commit date: 10 months ago
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
net/mptcp/options.c:57:4: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
ptr += 8;
^
>> net/mptcp/options.c:203:3: warning: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg]
remaining -= map_size;
^
net/mptcp/options.c:257:2: warning: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg]
remaining -= opt_size;
^
vim +203 net/mptcp/options.c
6d0060f600adfdd Mat Martineau 2020-01-21 177
6d0060f600adfdd Mat Martineau 2020-01-21 178 static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb,
6d0060f600adfdd Mat Martineau 2020-01-21 179 unsigned int *size,
6d0060f600adfdd Mat Martineau 2020-01-21 180 unsigned int remaining,
6d0060f600adfdd Mat Martineau 2020-01-21 181 struct mptcp_out_options *opts)
6d0060f600adfdd Mat Martineau 2020-01-21 182 {
6d0060f600adfdd Mat Martineau 2020-01-21 183 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
6d0060f600adfdd Mat Martineau 2020-01-21 184 unsigned int dss_size = 0;
6d0060f600adfdd Mat Martineau 2020-01-21 185 struct mptcp_ext *mpext;
6d0060f600adfdd Mat Martineau 2020-01-21 186 struct mptcp_sock *msk;
6d0060f600adfdd Mat Martineau 2020-01-21 187 unsigned int ack_size;
6d0060f600adfdd Mat Martineau 2020-01-21 188 u8 tcp_fin;
6d0060f600adfdd Mat Martineau 2020-01-21 189
6d0060f600adfdd Mat Martineau 2020-01-21 190 if (skb) {
6d0060f600adfdd Mat Martineau 2020-01-21 191 mpext = mptcp_get_ext(skb);
6d0060f600adfdd Mat Martineau 2020-01-21 192 tcp_fin = TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN;
6d0060f600adfdd Mat Martineau 2020-01-21 193 } else {
6d0060f600adfdd Mat Martineau 2020-01-21 194 mpext = NULL;
6d0060f600adfdd Mat Martineau 2020-01-21 195 tcp_fin = 0;
6d0060f600adfdd Mat Martineau 2020-01-21 196 }
6d0060f600adfdd Mat Martineau 2020-01-21 197
6d0060f600adfdd Mat Martineau 2020-01-21 198 if (!skb || (mpext && mpext->use_map) || tcp_fin) {
6d0060f600adfdd Mat Martineau 2020-01-21 199 unsigned int map_size;
6d0060f600adfdd Mat Martineau 2020-01-21 200
6d0060f600adfdd Mat Martineau 2020-01-21 201 map_size = TCPOLEN_MPTCP_DSS_BASE + TCPOLEN_MPTCP_DSS_MAP64;
6d0060f600adfdd Mat Martineau 2020-01-21 202
6d0060f600adfdd Mat Martineau 2020-01-21 @203 remaining -= map_size;
6d0060f600adfdd Mat Martineau 2020-01-21 204 dss_size = map_size;
6d0060f600adfdd Mat Martineau 2020-01-21 205 if (mpext)
6d0060f600adfdd Mat Martineau 2020-01-21 206 opts->ext_copy = *mpext;
6d0060f600adfdd Mat Martineau 2020-01-21 207
6d0060f600adfdd Mat Martineau 2020-01-21 208 if (skb && tcp_fin &&
6d0060f600adfdd Mat Martineau 2020-01-21 209 subflow->conn->sk_state != TCP_ESTABLISHED)
6d0060f600adfdd Mat Martineau 2020-01-21 210 mptcp_write_data_fin(subflow, &opts->ext_copy);
6d0060f600adfdd Mat Martineau 2020-01-21 211 }
6d0060f600adfdd Mat Martineau 2020-01-21 212
6d0060f600adfdd Mat Martineau 2020-01-21 213 ack_size = TCPOLEN_MPTCP_DSS_ACK64;
6d0060f600adfdd Mat Martineau 2020-01-21 214
6d0060f600adfdd Mat Martineau 2020-01-21 215 /* Add kind/length/subtype/flag overhead if mapping is not populated */
6d0060f600adfdd Mat Martineau 2020-01-21 216 if (dss_size == 0)
6d0060f600adfdd Mat Martineau 2020-01-21 217 ack_size += TCPOLEN_MPTCP_DSS_BASE;
6d0060f600adfdd Mat Martineau 2020-01-21 218
6d0060f600adfdd Mat Martineau 2020-01-21 219 dss_size += ack_size;
6d0060f600adfdd Mat Martineau 2020-01-21 220
6d0060f600adfdd Mat Martineau 2020-01-21 221 msk = mptcp_sk(mptcp_subflow_ctx(sk)->conn);
6d0060f600adfdd Mat Martineau 2020-01-21 222 if (msk) {
6d0060f600adfdd Mat Martineau 2020-01-21 223 opts->ext_copy.data_ack = msk->ack_seq;
6d0060f600adfdd Mat Martineau 2020-01-21 224 } else {
6d0060f600adfdd Mat Martineau 2020-01-21 225 mptcp_crypto_key_sha(mptcp_subflow_ctx(sk)->remote_key,
6d0060f600adfdd Mat Martineau 2020-01-21 226 NULL, &opts->ext_copy.data_ack);
6d0060f600adfdd Mat Martineau 2020-01-21 227 opts->ext_copy.data_ack++;
6d0060f600adfdd Mat Martineau 2020-01-21 228 }
6d0060f600adfdd Mat Martineau 2020-01-21 229
6d0060f600adfdd Mat Martineau 2020-01-21 230 opts->ext_copy.ack64 = 1;
6d0060f600adfdd Mat Martineau 2020-01-21 231 opts->ext_copy.use_ack = 1;
6d0060f600adfdd Mat Martineau 2020-01-21 232
6d0060f600adfdd Mat Martineau 2020-01-21 233 *size = ALIGN(dss_size, 4);
6d0060f600adfdd Mat Martineau 2020-01-21 234 return true;
6d0060f600adfdd Mat Martineau 2020-01-21 235 }
6d0060f600adfdd Mat Martineau 2020-01-21 236
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2020-11-19 8:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 8:01 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-11-19 8:27 net/mptcp/options.c:203:3: warning: Assignment of function parameter has no effect outside the function kernel test robot
2020-11-19 8:27 ` 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=202011191657.upunpmcs-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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.