From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=siyuan.fu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 04CA1211A963B for ; Sun, 6 Jan 2019 17:21:21 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jan 2019 17:21:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,449,1539673200"; d="scan'208";a="104430658" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga007.jf.intel.com with ESMTP; 06 Jan 2019 17:21:21 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.408.0; Sun, 6 Jan 2019 17:21:20 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.150]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.159]) with mapi id 14.03.0415.000; Mon, 7 Jan 2019 09:21:11 +0800 From: "Fu, Siyuan" To: Ashish Singhal , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH v2 2/4] NetworkPkg/IScsiDxe: Use UEFILib APIs to uninstall protocols. Thread-Index: AQHUpIIy4mtI8mmYI0GlitpLM48YsKWjBQPg Date: Mon, 7 Jan 2019 01:21:10 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWJjOWMyNWQtOWFjNi00MmExLWE1ZDAtOTM2NDlmMTJhNGJmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiR2d6MEx3OFdLUTZcL2dGTXphYk5DakJaVmpjSzJjNnRFY0V3ZjZIdFBDXC9NZFducVVtTFg3STlOTjcza0hndndTIn0= 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 2/4] NetworkPkg/IScsiDxe: Use UEFILib APIs to uninstall protocols. 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, 07 Jan 2019 01:21:22 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, Ashish The changes to NetworkPkg is good to me. Please add the package maintainer'= s name to the cc list of the patch mail in future, thanks. Reviewed-by: Fu Siyuan > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of As= hish > Singhal > Sent: Saturday, January 5, 2019 7:07 AM > To: edk2-devel@lists.01.org > Cc: Ashish Singhal > Subject: [edk2] [PATCH v2 2/4] NetworkPkg/IScsiDxe: Use UEFILib APIs to > uninstall protocols. >=20 > During cleanup in case of initialization failure, some driver > bindings are not installed. Using abstractions in UEFILib takes > care of it. >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1428 >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ashish Singhal > --- > NetworkPkg/IScsiDxe/IScsiDriver.c | 31 +++++++++++-------------------- > 1 file changed, 11 insertions(+), 20 deletions(-) >=20 > diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c > b/NetworkPkg/IScsiDxe/IScsiDriver.c > index 91176e6..8747de7 100644 > --- a/NetworkPkg/IScsiDxe/IScsiDriver.c > +++ b/NetworkPkg/IScsiDxe/IScsiDriver.c > @@ -1,6 +1,7 @@ > /** @file > The entry point of IScsi driver. >=20 > +Copyright (c) 2019, NVIDIA Corporation. All rights reserved. > Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
> (C) Copyright 2017 Hewlett Packard Enterprise Development LP
>=20 > @@ -1861,28 +1862,18 @@ Error3: > ); >=20 > Error2: > - gBS->UninstallMultipleProtocolInterfaces ( > - gIScsiIp6DriverBinding.DriverBindingHandle, > - &gEfiDriverBindingProtocolGuid, > - &gIScsiIp6DriverBinding, > - &gEfiComponentName2ProtocolGuid, > - &gIScsiComponentName2, > - &gEfiComponentNameProtocolGuid, > - &gIScsiComponentName, > - NULL > - ); > + EfiLibUninstallDriverBindingComponentName2 ( > + &gIScsiIp6DriverBinding, > + &gIScsiComponentName, > + &gIScsiComponentName2 > + ); >=20 > Error1: > - gBS->UninstallMultipleProtocolInterfaces ( > - ImageHandle, > - &gEfiDriverBindingProtocolGuid, > - &gIScsiIp4DriverBinding, > - &gEfiComponentName2ProtocolGuid, > - &gIScsiComponentName2, > - &gEfiComponentNameProtocolGuid, > - &gIScsiComponentName, > - NULL > - ); > + EfiLibUninstallDriverBindingComponentName2 ( > + &gIScsiIp4DriverBinding, > + &gIScsiComponentName, > + &gIScsiComponentName2 > + ); >=20 > return Status; > } > -- > 2.7.4 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel