All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] Re: [bug report] mptcp: Implement MPTCP receive path
@ 2020-02-17 15:56 Florian Westphal
  0 siblings, 0 replies; only message in thread
From: Florian Westphal @ 2020-02-17 15:56 UTC (permalink / raw)
  To: mptcp 

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-17 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-17 15:56 [MPTCP] Re: [bug report] mptcp: Implement MPTCP receive path Florian Westphal

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.