From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3F9CA211B85E9 for ; Thu, 17 Jan 2019 21:31:48 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2019 21:31:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,489,1539673200"; d="scan'208";a="312834009" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 17 Jan 2019 21:31:47 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 17 Jan 2019 21:31:47 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 17 Jan 2019 21:31:47 -0800 Received: from shsmsx107.ccr.corp.intel.com ([169.254.9.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.160]) with mapi id 14.03.0415.000; Fri, 18 Jan 2019 13:31:45 +0800 From: "Wu, Jiaxin" To: "Fu, Siyuan" , "Wu, Hao A" , "edk2-devel@lists.01.org" CC: "Ye, Ting" , "Gao, Liming" Thread-Topic: [PATCH v2 1/3] MdeModulePkg/Dhcp4Dxe: Remove unnecessary NULL pointer check. Thread-Index: AQHUruzyV3qNvcqa9kmGy07fQweQ9qWz95YAgAAB9ICAAIYwwA== Date: Fri, 18 Jan 2019 05:31:45 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B727416EC67B5@SHSMSX107.ccr.corp.intel.com> References: <20190118051612.9600-1-Jiaxin.wu@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTA1MjIwMjctOTZlNi00NDQ2LWFhYzYtZmE0NDI5OTNiNTI3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibTV0XC8yUlBsRGZPKzBcL0FNZkJBYVQxYWNqb245MGZnRTRGdnZTZnpzVXlPQVVGbUZma3BcL2hOY205c1J5UGpNeCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 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 05:31:48 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Just confirmed with Liming, we don't need to seed the full series patches i= f 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. >=20 > Hi, Jiaxin >=20 > Yes the full patch series is needed for a v2 version. >=20 > And also, why you removed the "(Instance->Token !=3D NULL)" check in the = if > condition? >=20 > BestRegards > Fu Siyuan >=20 >=20 > > -----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=3D1469 > > > > > > 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 th= e > BSD > > > License > > > which accompanies this distribution. The full text of the license m= ay 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 =3D NET_LIST_USER_STRUCT (Entry, DHCP_PROTOCOL, Link); > > > - > > > - if ((Instance !=3D NULL) && (Instance->Token !=3D NULL)) { > > > - Instance->Timeout--; > > > - if (Instance->Timeout =3D=3D 0) { > > > - PxeDhcpDone (Instance); > > > - } > > > + Instance->Timeout--; > > > + if (Instance->Timeout =3D=3D 0) { > > > + PxeDhcpDone (Instance); > > > } > > > } > > > > > > return ; > > > > > > -- > > > 2.17.1.windows.2