From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Geliang Tang <geliangtang@gmail.com>
Cc: Matthieu Baerts <matthieu.baerts@tessares.net>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, mptcp@lists.01.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mptcp: use list_first_entry_or_null
Date: Fri, 12 Jun 2020 11:22:31 -0700 (PDT) [thread overview]
Message-ID: <alpine.OSX.2.22.394.2006121114030.74555@mjmartin-mac01.local> (raw)
In-Reply-To: <9958d3f15d2d181eb9d48ffe5bf3251ec900f27a.1591941826.git.geliangtang@gmail.com>
Hello Geliang,
On Fri, 12 Jun 2020, Geliang Tang wrote:
> Use list_first_entry_or_null to simplify the code.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
> net/mptcp/protocol.h | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index 86d265500cf6..55c65abcad64 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -234,10 +234,7 @@ static inline struct mptcp_data_frag *mptcp_rtx_head(const struct sock *sk)
> {
> struct mptcp_sock *msk = mptcp_sk(sk);
>
> - if (list_empty(&msk->rtx_queue))
> - return NULL;
> -
> - return list_first_entry(&msk->rtx_queue, struct mptcp_data_frag, list);
> + return list_first_entry_or_null(&msk->rtx_queue, struct mptcp_data_frag, list);
> }
>
> struct mptcp_subflow_request_sock {
> --
> 2.17.1
As Matthieu mentioned on your earlier patch, please submit patches to
netdev with either a [PATCH net] or [PATCH net-next] tag. In this case,
these are non-critical bug fixes so they should be targeted at net-next.
Note that net-next branch is currently closed to submissions due to the
v5.8 merge window. Please resubmit both MPTCP patches for net-next when
David announces that it is open again. The change does look ok but will
not be merged now.
Thanks for your patch,
--
Mat Martineau
Intel
next prev parent reply other threads:[~2020-06-12 18:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 6:05 Geliang Tang
2020-06-12 18:22 ` Mat Martineau [this message]
2020-06-15 8:48 ` Geliang Tang
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=alpine.OSX.2.22.394.2006121114030.74555@mjmartin-mac01.local \
--to=mathew.j.martineau@linux.intel.com \
--cc=davem@davemloft.net \
--cc=geliangtang@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthieu.baerts@tessares.net \
--cc=mptcp@lists.01.org \
--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
all inboxes | Powered by JetHome®