Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1504607ybt; Mon, 15 Jun 2020 01:55:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySkdIRA5N2nxBlpqTtmKkN8nQ/jAHh2hXTmDESm8PLldsF2iG6h96NcM6UhefDSHBoPhCH X-Received: by 2002:a50:fb86:: with SMTP id e6mr23715647edq.65.1592211336635; Mon, 15 Jun 2020 01:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592211336; cv=none; d=google.com; s=arc-20160816; b=aFk2Ilnu6tO3FThUT94qAO2ij48rW+Y1GjjqpImQX8HHfFDkAAMDGmW43N2WruAkGn VAjj2R6YXiQsOqvZ39ZBZotsn1mwZFqpDqzSyesCspBA5Ll/fjQ68nOAXyZ5BYPdiw/H 6qNGRqX7hmMoTai7TnFOgdZl7xcteGVL9k1rnLfv6bzjp24rA+/UVbEV2vlJyUJeonFU 59hst6hIhRa0hSrYQnl9PhlOOmi3iZEvETsoRd50blfepPsDzcFrXp/nxY+O1dXbSmtY 319U2lxMkRSKSCh49WuAKnRRYJkV/JbcVz/Yz/2C947TvEXld1lGJGIi5WlccJgCGG0h GmKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sjNYNYB2PAqYsekC8o7YkscXKB6lDVKLys43kVcoOyw=; b=ibbL0H/9V3mfb9DYRxJmcGR9uKKr9pkaOlXqz1eCVSuUbTqxy2R+CrNWmWtEVuji8E 4Ec66Eo9bztM2hv+EVdVaE8UB8e60F7rOHXNwY8FAbln/BmmUbZFcQS9KPGF42zOORsM NzL0Z6Co4taDU90PjmYYJ7TbOVRY8OO3LJiAV1vFkK+o+2I3a/BpcRnA+Xh6FM1idxCO 7qiZne5jevS5rNfe+hLCEZlaicihEjXtcUxGmxz081ngX1DKoz5oUzHyNEFJ2dQDyWxt z/kUMGTWHII8gpqjVlPt2MMJrIcrIa0WWmHieXC7vRJ/SxLaMDgQE48bGk2neiYnqXxf M3xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MfGKyzEs; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mh16si8566457ejb.129.2020.06.15.01.55.13; Mon, 15 Jun 2020 01:55:36 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MfGKyzEs; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729233AbgFOIvK (ORCPT + 99 others); Mon, 15 Jun 2020 04:51:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728496AbgFOIvJ (ORCPT ); Mon, 15 Jun 2020 04:51:09 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A56AC061A0E; Mon, 15 Jun 2020 01:51:08 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id r18so7318028pgk.11; Mon, 15 Jun 2020 01:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sjNYNYB2PAqYsekC8o7YkscXKB6lDVKLys43kVcoOyw=; b=MfGKyzEsW7VC3DPvSItwZ3BVWqoTwlo4UIX2/khNf38eXAOW+JSrQk1vUsv6Img/xE LQTKx52rR9V/RXvrb1t9GY3yf47p4HArkMQS9wdLWWxLuXDHnmNdxbv61/PJNH1uLI+f QeMJGSo9ILr9xekl/ffPEHfOwolZgRcY+4r/2mbeo2HLulsnc/b+gbiUsEPoQ37PKTOU ctdBAOE9SDCLmvB2UJ5l71KPyuXK+laLZLeMgFFtdIK+NcJIVitEk21pk/mfb+rX7vvI Upsa0u2g6NmC/rmzZ0rmt5Fgnwbr1mfH4cImC5TLBRxIouGx4zNPOpSU7fC61BYQUusj CQAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=sjNYNYB2PAqYsekC8o7YkscXKB6lDVKLys43kVcoOyw=; b=b04j0VVFIgCAft32Rk2Q4O3DCISnGI8LumBIL0teSxaWiIez4CynpqXXE2/YM1xKbv 3t95dfYdq5Mvc7clNi76BAflrXwjedssGVIpXI8fd9qU30LIYBO0D1Yk36KDQp45hRm5 8702xEUinGuDETpe5n2So3vHKQVfC1NcfUbgSQHPRocHI/1oSjGJIpBs38AAkgXkS+BO oAfjlND39F2MqhOA/O3zSP+/2tREInAusvTmUo5ON+DeMojOcNkJd7PoDQF3wSSeignU 6XbBlQRPm+LIbv/QaMvFo3zoGV/Qat2agJHOYanwhMWicUL6ygTrpixs9ZYnrjZJ/HCK bQ5Q== X-Gm-Message-State: AOAM531xCRKSDx3N4sOM/wxP60G2F+1qpakwjwcaBZ2qrzkPxrTQP7rN JzsnXtj7kfXZ9Acw8pXE984= X-Received: by 2002:a63:1310:: with SMTP id i16mr20123019pgl.351.1592211068094; Mon, 15 Jun 2020 01:51:08 -0700 (PDT) Received: from localhost ([43.224.245.180]) by smtp.gmail.com with ESMTPSA id e78sm13199951pfh.50.2020.06.15.01.51.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2020 01:51:07 -0700 (PDT) Date: Mon, 15 Jun 2020 16:48:55 +0800 From: Geliang Tang To: Mat Martineau Cc: Matthieu Baerts , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Peter Krystad , netdev@vger.kernel.org, mptcp@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mptcp: use list_first_entry_or_null Message-ID: <20200615084855.GB29964@OptiPlex> References: <9958d3f15d2d181eb9d48ffe5bf3251ec900f27a.1591941826.git.geliangtang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 12, 2020 at 11:22:31AM -0700, Mat Martineau wrote: > > 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 Hi Mat, Thanks for your reply. I have already resend patch v2 to you. -Geliang