From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.85.128.46; helo=mail-wm1-f46.google.com; envelope-from=philmd@redhat.com; receiver=edk2-devel@lists.01.org Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 1C252211B76C8 for ; Mon, 21 Jan 2019 05:26:54 -0800 (PST) Received: by mail-wm1-f46.google.com with SMTP id y139so10699838wmc.5 for ; Mon, 21 Jan 2019 05:26:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lIBa2/PXt3p1R5uqa83hk8kGu+qYyLWLHx2wQdbHD4s=; b=KwBkFT3+o0HvZXz/ZKRboAdcUSX+wX8pkPvAlP2hxHDjypClFEd0V1oNIuj5HTiYzD KYuK3N7MLSYWovXXy+oSyWqs2kIDaoBBH2MNJzzCjowHprOjV8M/xgg2CGWjEGMCKeRh HILkkZNq9sCgq4Ie41xVVaQIRWM8XH88HyNc35hvaWBZ6uqEUpqnuZsK1ZtYntOcfQXk C2DEId31+O8DUjAUizgzuketSTDkes3a4KSGE8taI9EH9lRqIe8BanphReb8waXV5HzS U6AahCIH7xFa1RCPkIpwzSAyvAjYroihgmysTD0aLoEw0aC5mqT0IRing1fILnaXQQDY 2weA== X-Gm-Message-State: AJcUukcbiqkJf/2x+zO/fLIKnqOt0mcHhpahra9hZzgNnaU/GdtnAaT2 nWeK2aYPXMrBXQ4cSaCWaiyf6ghPE74= X-Google-Smtp-Source: ALg8bN5sJZGn6VpNjDjZnmhAIgOwG3OpysLtXlr2U9d9eR9g+3Bozjr9wdewikLoyQtwMK5d6WmuoQ== X-Received: by 2002:a1c:5656:: with SMTP id k83mr25119905wmb.125.1548077210781; Mon, 21 Jan 2019 05:26:50 -0800 (PST) Received: from [192.168.1.39] (110.red-83-51-161.dynamicip.rima-tde.net. [83.51.161.110]) by smtp.gmail.com with ESMTPSA id s8sm106437879wrn.44.2019.01.21.05.26.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 05:26:50 -0800 (PST) To: "Gao, Liming" , Laszlo Ersek , Ard Biesheuvel Cc: "Wu, Hao A" , "Ye, Ting" , "Fu, Siyuan" , "Wu, Jiaxin" , "edk2-devel@lists.01.org" References: <20190118051612.9600-1-Jiaxin.wu@intel.com> <895558F6EA4E3B41AC93A00D163B727416EC67B5@SHSMSX107.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E3B4596@SHSMSX152.ccr.corp.intel.com> <70bb0ff8-09fe-42c9-0152-ffed039033bd@redhat.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E3BF550@SHSMSX104.ccr.corp.intel.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <0b4e9578-9831-cc59-1dad-e53d44492fa0@redhat.com> Date: Mon, 21 Jan 2019 14:26:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3BF550@SHSMSX104.ccr.corp.intel.com> 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: Mon, 21 Jan 2019 13:26:55 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi, On 1/21/19 1:53 PM, Gao, Liming wrote: > Thanks Ard and Laszlo. For the minor change in single patch, the patch may be sent separately with the clear subject. Or, the patch set can be sent again. Since it is hard to follow technical discussion when top-posted (see https://www.caliburn.nl/topposting.html) without scrolling and sometime loosing context, can we gently suggest bottom-posting in edk2-devel etiquette? (No offence, this is a humble suggestion from a not very active reviewer to a highly active contributor, but this might ease the on-list review workflow). >> -----Original Message----- >> From: Laszlo Ersek [mailto:lersek@redhat.com] >> Sent: Saturday, January 19, 2019 9:17 AM >> To: Ard Biesheuvel ; Gao, Liming >> Cc: Wu, Jiaxin ; Fu, Siyuan ; Wu, Hao A ; edk2-devel@lists.01.org; Ye, >> Ting >> Subject: Re: [PATCH v2 1/3] MdeModulePkg/Dhcp4Dxe: Remove unnecessary NULL pointer check. >> >> On 01/18/19 12:09, Ard Biesheuvel wrote: >>> 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. >> >> I think resending one patch can be acceptable, but the subject line >> (patch nr) and the threading have to be correct. Also, I don't think >> this approach scales beyond exactly one patch-update; it's easy to lose >> track of version numbers etc. So "use sparingly" I guess? :) For a 3 patches series, I wouldn't worry resending the whole series... The 'git backport-diff' tool is very powerful to resume differencies between 2 series, in particular when the project evolved between versions of a series (simplest example: a rebase): https://github.com/codyprime/git-scripts/blob/master/git-backport-diff#L27 Sadly I can't find a distribution handy package that provides it, so it has to be installed manually. Regards, Phil. >>>>> -----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