Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp671687ybg; Fri, 12 Jun 2020 11:24:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0gjPwYxxIfufrwHwdMPfTRPFqjTrGvvXK3niLDW24JjkF/b5c/Yw2sHMhvbwdH/B89XEa X-Received: by 2002:a17:906:7751:: with SMTP id o17mr14976689ejn.111.1591986296785; Fri, 12 Jun 2020 11:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591986296; cv=none; d=google.com; s=arc-20160816; b=xQMNxEsHYs7URE/NBUDOrOyc1IwIWxqGcSyueWlHa3hk+yOgu/3gDF+nQTgl4rsiHN oLQZsEK96JGmDnKUDWNQb0TmvTX80d3+PjiNsC0o/LWnANNLyDGITKmaAJF+2ghWDSGx CoWiG7Ls4DI72tIbKWuNd/LrjhJaAaDvBUgwbyk6URqqa3jHuBydGpeNA39izJaKdy5v pj5fUN+wHegpaX/HfmdQ8Wp4rDjOkTahqN736KttnDf19Mp6Ff3ouLA71JmfeEok2dTi nzksJKKf4O2vC5kibwv8P0fcijUnVOOnD3gufuHpS4fzDkUO4VgJbsV0WvN5Or0YPnos pSxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=1EXL6QdS/kJkk4kC9o0vTyGr+d6lgjSkO4Jd/Szo7Wc=; b=Prb7kin5plKN5O3OXOuBcSjmlbKcAubCiqcLoKJSojvReZI7vBipI2jBm5chfocueI sDs1JO7DKs8acY+SsmXycRqXUX8BvFU+XxaMHd11aj1INy9NEFgONdH+k74jEE1TQpGp +iykP87dKuE/tk74oWxTqC+Jj54kpFM7L76cpcvVVkwJnZut71bR4jzsW9EbS23zUIRg PGOwy6ucI16e/b3jgee4PpxM1rTHyZz/eBMJvEFObJsPLh7DgF9IgsfdxgPs8KLwVvLy 8GkICGG/QH/mc0Xq7nCBg4PSOM3ANPHyycxnZWflnk8JZiw8JRJUU1au8Ygui51dgpRf aLaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gg12si4446493ejb.27.2020.06.12.11.24.34; Fri, 12 Jun 2020 11:24:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726310AbgFLSWc (ORCPT + 99 others); Fri, 12 Jun 2020 14:22:32 -0400 Received: from mga11.intel.com ([192.55.52.93]:44495 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726085AbgFLSWc (ORCPT ); Fri, 12 Jun 2020 14:22:32 -0400 IronPort-SDR: Z12PSZSG+mI4KWSv01DKOWd6ZlHXKRv1NH6VtA2ytmn/7ztHo+Vn1B0UxWDuYg72MuaxeQJCs1 utOQ0yBcbsOg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jun 2020 11:22:32 -0700 IronPort-SDR: VYM7jvspyQwv6EtaDpbciatVWJk76aW7QuH7VlgsL2YMsYDMgO8nYKfj3qJlX2p0NwsR72Ku5k mUajBmJh60rg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,504,1583222400"; d="scan'208";a="275821509" Received: from unknown (HELO [10.255.231.235]) ([10.255.231.235]) by orsmga006.jf.intel.com with ESMTP; 12 Jun 2020 11:22:31 -0700 Date: Fri, 12 Jun 2020 11:22:31 -0700 (PDT) From: Mat Martineau X-X-Sender: mjmartin@mjmartin-mac01.local To: Geliang Tang cc: Matthieu Baerts , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, mptcp@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mptcp: use list_first_entry_or_null In-Reply-To: <9958d3f15d2d181eb9d48ffe5bf3251ec900f27a.1591941826.git.geliangtang@gmail.com> Message-ID: References: <9958d3f15d2d181eb9d48ffe5bf3251ec900f27a.1591941826.git.geliangtang@gmail.com> User-Agent: Alpine 2.22 (OSX 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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