Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp298517pxt; Fri, 6 Aug 2021 02:15:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuQxgat6t/JI7tTFqkmXCEnU+qSry2DSPyGKrRfHCCfJHn7QAGHGcbmZ+7z8+icIHfC7aU X-Received: by 2002:a6b:6d02:: with SMTP id a2mr135666iod.93.1628241330037; Fri, 06 Aug 2021 02:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628241330; cv=none; d=google.com; s=arc-20160816; b=PFC7n/oO303F9RruPTeU1YdDjDYWzzQLPhbZH84EZeRiq3TkCutzFgHhvGnozgSC4a SHHOtDbzX3SfZFAUoKCebkCTAidFpmq+vSsxBxomZQSPf5Fb0JHMnFTL2NJXNhZDrvPR Dm1FuGupCjR3BsQNHFDCUL1S74b3Sz0PTWSHVC7cnYbD0aoVEKsLnTNOQWRwSWQj6gMp iYxTfVMCvGgVh16C+X8qSOHphHTvUQrhmib61b+AC7tiAG6Z+3z4cbWN8n9KB7ww4aJf 7GGx1uleDYl+2cCReW7OSErZPu6PsXlXtpnr3u6pzFwy17ELIi6CbOCn+wCfrz35Agk3 m4/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:cc:to:subject:message-id :from:content-transfer-encoding:date:dkim-signature:mime-version; bh=hqVQBmaEF2fDEHUUbwaYPLD3q9fwnxrg3znPjsP3I54=; b=gqzSdE540UBUfGMHA2lysDr5h7rd15uMc21ZzVO+QADBDhA3tLeRmaUIT63E2RdBX+ GxqaVp5Nd3iwEhHjLZ5Yf6316vX0HipcVvzZAuyyEHJl08vn/9TpXUsl5OEyPNa61Ata TCxZAYG47CsJ/caTDes9nVqDkAoONMKs7jOL1+sTdBfC/uqid9i6scr1osSP4m6X+Grd +9nwRNB7lIpdKV1+0obfm/sLOpvCW+gE24mNqKOqgw8lBRu56A13FwaVfMU4g2kvTIuV Wbb8d+r+eE8EhlNrmmzDUuU2arzQIMVpXgthLzycW5TEtnt1KumF2vdOkz8EX8FVCX9N 8iGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=YkflkaAv; 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=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si379448ioi.55.2021.08.06.02.15.17; Fri, 06 Aug 2021 02:15:30 -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=@linux.dev header.s=key1 header.b=YkflkaAv; 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=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244232AbhHFJNj (ORCPT + 99 others); Fri, 6 Aug 2021 05:13:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244111AbhHFJNj (ORCPT ); Fri, 6 Aug 2021 05:13:39 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90082C061798; Fri, 6 Aug 2021 02:13:23 -0700 (PDT) MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1628241201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hqVQBmaEF2fDEHUUbwaYPLD3q9fwnxrg3znPjsP3I54=; b=YkflkaAvMPaIO3ZqTrNGRkrJaHGtFAKsF2y95PY5C/qIilBv9+zekavF/hbes4KxycBAql 6OkLDeDoHv9NXhCQoPqdJA2g9SZ4do21CqTfF6/HNw02Ir7IRudHrCJIdQbRWMI0j1C6G0 d/mbkUgEybNjlrD7tDUEYA88Z8g14Gs= Date: Fri, 06 Aug 2021 09:13:21 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: yajun.deng@linux.dev Message-ID: Subject: Re: [PATCH net-next] net: Remove redundant if statements To: "Matthieu Baerts" , davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <4b175501-50c1-fedf-1eaf-05c0de67c3c8@tessares.net> References: <4b175501-50c1-fedf-1eaf-05c0de67c3c8@tessares.net> <20210806063847.21639-1-yajun.deng@linux.dev> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: yajun.deng@linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org August 6, 2021 4:58 PM, "Matthieu Baerts" = wrote:=0A=0A> Hi Yajun,=0A> =0A> Thank you for sharing this patch.=0A> = =0A> On 06/08/2021 08:38, Yajun Deng wrote:=0A> =0A>> The if statement al= ready move into sock_{put , hold},=0A>> just remove it.=0A> =0A> I was wo= ndering in which subtree you had 'sock_put' checking the socket=0A> point= er but then I realised you sent another patch just before adding=0A> this= check: "net: sock: add the case if sk is NULL"=0A> =0A> Please next time= send them in the same series to clearly indicate that=0A> this is the 2n= d patch (2/2) and it depends on patch 1/2.=0A> =0AOK, Thank you for your = advice.=0A=0A> Related to the modification in MPTCP part: it looks OK but= we do a few=0A> other calls to 'sock_put()' where we don't need to check= if the socket=0A> is NULL or not.=0A> =0A> In other words, if your patch= "net: sock: add the case if sk is NULL" is=0A> accepted, then the modifi= cation in "net/mptcp/subflow.c" is OK for us.=0A> =0A> Cheers,=0A> Matt= =0A> --=0A> Tessares | Belgium | Hybrid Access Solutions=0A> www.tessares= .net