From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::12a; helo=mail-it1-x12a.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x12a.google.com (mail-it1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DE364211B6C0E for ; Fri, 18 Jan 2019 03:10:05 -0800 (PST) Received: by mail-it1-x12a.google.com with SMTP id p197so5299801itp.0 for ; Fri, 18 Jan 2019 03:10:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KfleB2Sy7f5JPA/6myi/ZnyUkZYZ1boCdZnouWUR6FM=; b=M0wmx0y19arTkettc5oy02EL/rNCt2w7zbTO9xOWdGLj1DRzbUblAG2FaUMQv7PKa9 CKQBKFV/c97d5PaSXBRXm133jn4Bf4goP33dOH00XBkFEAoIvJdp18HGyBCKKaH38hOp CdjLaU4SOxPAyLVxzZWJjeLbZab7NV1H7dLPI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KfleB2Sy7f5JPA/6myi/ZnyUkZYZ1boCdZnouWUR6FM=; b=Bpq501cjA/meNlZKEbO2EC6NLt+9twPpJ1jAgWsWWY92xoFAIjf6SDeIxRDaIoy/uq 3CNHoYxs4Hn4ZtJo/XHW71J7v6fFc6b64R/HPKyUMa19f2DQ+SnTrLCLUVnzGJ6EXM3F TP6zkl7kzxrUKHOkThPPpVfNxYBfhWBaE3m/g5QgWXn9AAd27yKD7Iw5nfgrdRn4n6mG 38GLQj5dB4vzeY0fn7orapwaUzEfo4pzTGV7TQdLmO/sKp0n1ATULzobPaWu3VAXp7tj acX3RcKiKY93LMyzC03NEoITv93o0TLWeFohy5NuS31RBPFtoAbtQAHeUw4SlMW8mTM3 skFQ== X-Gm-Message-State: AJcUukd9hhPflyy1oUjsIUbDbooNB+mrCC6MPWJtPWbIhYzHkDJ0Sheh qSAA567603uHmDP0PwKAx0sPoYC/anakaxpB7nJPrA== X-Google-Smtp-Source: ALg8bN5ashMgB0haAtca61YDHKu66VUAWEzotNI96Gbe40jMjMiNKWJNXrd1xDItBot75QvoWugFwmb30WIpS+HasPs= X-Received: by 2002:a24:710:: with SMTP id f16mr9432061itf.121.1547809804646; Fri, 18 Jan 2019 03:10:04 -0800 (PST) MIME-Version: 1.0 References: <20190118051612.9600-1-Jiaxin.wu@intel.com> <895558F6EA4E3B41AC93A00D163B727416EC67B5@SHSMSX107.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E3B4596@SHSMSX152.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3B4596@SHSMSX152.ccr.corp.intel.com> From: Ard Biesheuvel Date: Fri, 18 Jan 2019 12:09:53 +0100 Message-ID: To: "Gao, Liming" Cc: "Wu, Jiaxin" , "Fu, Siyuan" , "Wu, Hao A" , "edk2-devel@lists.01.org" , "Laszlo Ersek (lersek@redhat.com)" , "Ye, Ting" Subject: Re: [PATCH v2 1/3] MdeModulePkg/Dhcp4Dxe: Remove unnecessary NULL pointer check. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 11:10:06 -0000 Content-Type: text/plain; charset="UTF-8" On Fri, 18 Jan 2019 at 06:38, Gao, Liming wrote: > > This is my idea to avoid the duplicated mail. I also include Ard and Laszlo to collect the feedback on how to handle the partial update in the patchset. > Laszlo may disagree with me, but I think that it is not always necessary to resend the entire series when only a single patch changes. It does depend on the situation, though: if it is a trivial patch in a more complicated series then it might make little sense. In other case, just resending the whole thing is probably better. > > -----Original Message----- > > From: Wu, Jiaxin > > Sent: Friday, January 18, 2019 1:32 PM > > To: Fu, Siyuan ; Wu, Hao A ; edk2-devel@lists.01.org > > Cc: Ye, Ting ; Gao, Liming > > Subject: RE: [PATCH v2 1/3] MdeModulePkg/Dhcp4Dxe: Remove unnecessary NULL pointer check. > > > > Just confirmed with Liming, we don't need to seed the full series patches if only one is updated. > > > > Thanks, > > jiaxin > > > > > -----Original Message----- > > > From: Fu, Siyuan > > > Sent: Friday, January 18, 2019 1:29 PM > > > To: Wu, Hao A ; Wu, Jiaxin ; > > > edk2-devel@lists.01.org > > > Cc: Ye, Ting ; Gao, Liming > > > Subject: RE: [PATCH v2 1/3] MdeModulePkg/Dhcp4Dxe: Remove > > > unnecessary NULL pointer check. > > > > > > Hi, Jiaxin > > > > > > Yes the full patch series is needed for a v2 version. > > > > > > And also, why you removed the "(Instance->Token != NULL)" check in the if > > > condition? > > > > > > BestRegards > > > Fu Siyuan > > > > > > > > > > -----Original Message----- > > > > From: Wu, Hao A > > > > Sent: Friday, January 18, 2019 1:22 PM > > > > To: Wu, Jiaxin ; edk2-devel@lists.01.org > > > > Cc: Ye, Ting ; Fu, Siyuan ; Gao, > > > > Liming > > > > Subject: RE: [PATCH v2 1/3] MdeModulePkg/Dhcp4Dxe: Remove > > > unnecessary NULL > > > > pointer check. > > > > > > > > Hi Jiaxin, > > > > > > > > A comment that is not related with the content of the patch itself: > > > > Please help to send the full patch series when a new version is needed. > > > > > > > > Best Regards, > > > > Hao Wu > > > > > > > > > -----Original Message----- > > > > > From: Wu, Jiaxin > > > > > Sent: Friday, January 18, 2019 1:16 PM > > > > > To: edk2-devel@lists.01.org > > > > > Cc: Ye, Ting; Fu, Siyuan; Wu, Hao A; Gao, Liming; Wu, Jiaxin > > > > > Subject: [PATCH v2 1/3] MdeModulePkg/Dhcp4Dxe: Remove > > > unnecessary > > > > > NULL pointer check. > > > > > > > > > > v2: The DHCP Instance might be destroyed in PxeDhcpDone. So, > > > > > we need safe-delete. > > > > > > > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1469 > > > > > > > > > > Since the value of Instance is retrieved from the list Entry, > > > > > it can't be the NULL pointer, so just remove the unnecessary > > > > > check. > > > > > > > > > > Cc: Ye Ting > > > > > Cc: Fu Siyuan > > > > > Cc: Wu Hao A > > > > > Cc: Gao Liming > > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > > > > Signed-off-by: Wu Jiaxin > > > > > --- > > > > > MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c | 11 ++++----- > > > -- > > > > > 1 file changed, 4 insertions(+), 7 deletions(-) > > > > > > > > > > diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c > > > > > b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c > > > > > index 98a22a77b4..780f8b4224 100644 > > > > > --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c > > > > > +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c > > > > > @@ -1,9 +1,9 @@ > > > > > /** @file > > > > > EFI DHCP protocol implementation. > > > > > > > > > > -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> > > > > +Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> > > > > This program and the accompanying materials > > > > > are licensed and made available under the terms and conditions of the > > > BSD > > > > > License > > > > > which accompanies this distribution. The full text of the license may be > > > > > found at > > > > > http://opensource.org/licenses/bsd-license.php > > > > > > > > > > @@ -1646,16 +1646,13 @@ ON_EXIT: > > > > > // > > > > > // Iterate through all the DhcpSb Children. > > > > > // > > > > > NET_LIST_FOR_EACH_SAFE (Entry, Next, &DhcpSb->Children) { > > > > > Instance = NET_LIST_USER_STRUCT (Entry, DHCP_PROTOCOL, Link); > > > > > - > > > > > - if ((Instance != NULL) && (Instance->Token != NULL)) { > > > > > - Instance->Timeout--; > > > > > - if (Instance->Timeout == 0) { > > > > > - PxeDhcpDone (Instance); > > > > > - } > > > > > + Instance->Timeout--; > > > > > + if (Instance->Timeout == 0) { > > > > > + PxeDhcpDone (Instance); > > > > > } > > > > > } > > > > > > > > > > return ; > > > > > > > > > > -- > > > > > 2.17.1.windows.2 >