From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: zailiang.sun@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Thu, 09 May 2019 00:53:52 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 00:53:51 -0700 X-ExtLoop1: 1 Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 09 May 2019 00:53:50 -0700 Received: from fmsmsx163.amr.corp.intel.com (10.18.125.72) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 9 May 2019 00:53:50 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx163.amr.corp.intel.com (10.18.125.72) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 9 May 2019 00:53:50 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.33]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.10]) with mapi id 14.03.0415.000; Thu, 9 May 2019 15:53:48 +0800 From: "Sun, Zailiang" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Qian, Yi" Subject: Re: [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Thread-Topic: [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Thread-Index: AQHVBiAQuZY2kI33FUS37EDmlQ3N8KZibGQg Date: Thu, 9 May 2019 07:53:48 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C62DBC@SHSMSX104.ccr.corp.intel.com> References: <20190509043111.15272-1-michael.d.kinney@intel.com> <20190509043111.15272-2-michael.d.kinney@intel.com> In-Reply-To: <20190509043111.15272-2-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Zailiang Sun > -----Original Message----- > From: Kinney, Michael D > Sent: Thursday, May 9, 2019 12:31 PM > To: devel@edk2.groups.io > Cc: Sun, Zailiang ; Qian, Yi > Subject: [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add erro= r > return >=20 > If the FLASH device cannot be erased or written, then the flag FlashError= is > set to TRUE. >=20 > Add the missing logic to return an error if FlashError is TRUE. The miss= ing logic > was found from a GCC build that noticed a local variable was declared and > assigned, but was not being used. >=20 > Cc: Zailiang Sun > Cc: Yi Qian > Signed-off-by: Michael D Kinney > --- > .../Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git > a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfo > rmFlashAccessLib.c > b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platf > ormFlashAccessLib.c > index 052ccb891c..079c3ef2d6 100644 > --- > a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Platfo > rmFlashAccessLib.c > +++ b/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/P > +++ latformFlashAccessLib.c > @@ -1,7 +1,7 @@ > /** @file > Platform Flash Access library. >=20 > - Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
> + Copyright (c) 2016 - 2019, Intel Corporation. All rights > + reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -529,6 +529,10 @@ Done: > Progress (EndPercentage); > } >=20 > + if (FlashError) { > + return EFI_WRITE_PROTECTED; > + } > + > return EFI_SUCCESS; > } >=20 > -- > 2.21.0.windows.1