From: Florian Westphal <fw at strlen.de>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [bug report] mptcp: Implement MPTCP receive path
Date: Mon, 17 Feb 2020 16:56:27 +0100 [thread overview]
Message-ID: <20200217155627.GG19559@breakpoint.cc> (raw)
In-Reply-To: 20200217145214.sfn76fqgt6ixo5sw@kili.mountain
[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]
Dan Carpenter <dan.carpenter(a)oracle.com> wrote:
> Hello Mat Martineau,
>
> The patch 648ef4b88673: "mptcp: Implement MPTCP receive path" from
> Jan 21, 2020, leads to the following static checker warning:
>
> net/mptcp/subflow.c:558 subflow_data_ready()
> warn: test_bit() takes a bit number
[..]
> net/mptcp/subflow.c
> 544 static void subflow_data_ready(struct sock *sk)
> 545 {
> 546 struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
> 547 struct sock *parent = subflow->conn;
> 548
> 549 if (!parent || !subflow->mp_capable) {
> 550 subflow->tcp_data_ready(sk);
> 551
> 552 if (parent)
> 553 parent->sk_data_ready(parent);
> 554 return;
> 555 }
> 556
> 557 if (mptcp_subflow_data_available(sk)) {
> 558 set_bit(MPTCP_DATA_READY, &mptcp_sk(parent)->flags);
> ^^^^^^^^^^^^^^^^
> This is "BIT(0)" but it should just be "0". The double shift bug will
> not cause a problem so long as it is done consistently and it doesn't go
> higher than BIT(6).
Indeed, thanks for reporting. I've sent a simple patch to toss the
BIT() part.
reply other threads:[~2020-02-17 15:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200217155627.GG19559@breakpoint.cc \
--to=unknown@example.com \
/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.