From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: mathew.j.martineau@linux.intel.com
Cc: matthieu.baerts@tessares.net, davem@davemloft.net,
kuba@kernel.org, netdev@vger.kernel.org, mptcp@lists.linux.dev,
linux-kernel@vger.kernel.org,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Subject: [PATCH] mptcp: Remove redundant assignment to remaining
Date: Tue, 15 Jun 2021 18:55:38 +0800 [thread overview]
Message-ID: <1623754538-85616-1-git-send-email-jiapeng.chong@linux.alibaba.com> (raw)
Variable remaining is assigned, but this value is never read as it is
not used later on, hence it is a redundant assignment and can be
removed.
Clean up the following clang-analyzer warning:
net/mptcp/options.c:779:3: warning: Value stored to 'remaining' is never
read [clang-analyzer-deadcode.DeadStores].
net/mptcp/options.c:547:3: warning: Value stored to 'remaining' is never
read [clang-analyzer-deadcode.DeadStores].
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
net/mptcp/options.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 9b263f2..f99272f 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -544,7 +544,6 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb,
map_size = TCPOLEN_MPTCP_DSS_BASE + TCPOLEN_MPTCP_DSS_MAP64;
- remaining -= map_size;
dss_size = map_size;
if (mpext)
opts->ext_copy = *mpext;
@@ -776,7 +775,6 @@ bool mptcp_established_options(struct sock *sk, struct sk_buff *skb,
if (mptcp_established_options_mp_prio(sk, &opt_size, remaining, opts)) {
*size += opt_size;
- remaining -= opt_size;
ret = true;
}
--
1.8.3.1
next reply other threads:[~2021-06-15 10:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 10:55 Jiapeng Chong [this message]
2021-06-15 23:52 ` [PATCH] mptcp: Remove redundant assignment to remaining Mat Martineau
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=1623754538-85616-1-git-send-email-jiapeng.chong@linux.alibaba.com \
--to=jiapeng.chong@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathew.j.martineau@linux.intel.com \
--cc=matthieu.baerts@tessares.net \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.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 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).