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.126, mailfrom: yi.qian@intel.com) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Thu, 09 May 2019 06:18:07 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2019 06:18:07 -0700 X-ExtLoop1: 1 Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 09 May 2019 06:18:07 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 9 May 2019 06:18:06 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.249]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.136]) with mapi id 14.03.0415.000; Thu, 9 May 2019 21:18:05 +0800 From: "Qian, Yi" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Sun, Zailiang" Subject: Re: [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Thread-Topic: [Patch 01/16] Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add error return Thread-Index: AQHVBiAQ7rZ+Bsyuv0S8hupsPU3kB6ZixtXg Date: Thu, 9 May 2019 13:18:04 +0000 Message-ID: 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: yi.qian@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed by Qian, Yi Thanks QianYi -----Original Message----- From: Kinney, Michael D=20 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 error= return If the FLASH device cannot be erased or written, then the flag FlashError = is set to TRUE. Add the missing logic to return an error if FlashError is TRUE. The missi= ng logic was found from a GCC build that noticed a local variable was decla= red and assigned, but was not being used. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccess= Lib/PlatformFlashAccessLib.c b/Vlv2TbltDevicePkg/Feature/Capsule/Library/Pl= atformFlashAccessLib/PlatformFlashAccessLib.c index 052ccb891c..079c3ef2d6 100644 --- a/Vlv2TbltDevicePkg/Feature/Capsule/Library/PlatformFlashAccessLib/Pla= tformFlashAccessLib.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=20 + 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 --=20 Qian Yi