From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=ZlOGB9Ie; spf=pass (domain: linaro.org, ip: 209.85.128.68, mailfrom: leif.lindholm@linaro.org) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by groups.io with SMTP; Wed, 29 May 2019 04:11:47 -0700 Received: by mail-wm1-f68.google.com with SMTP id u78so1375087wmu.5 for ; Wed, 29 May 2019 04:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QSQG81eRgnpHNzNtYS/UdSJBODcnemsUEEs5gWWXFtQ=; b=ZlOGB9IeBMt6lm+4XNRhrkrM3ug5A7VSoe5039jldfBQG0w0d3s14u0CsuQD5/lXLc adYIxMebmD969y6qzQb7YTHIMxRzZmXIvX4OZpoX/D2RGnSXSP+etdL33nDDgYJH0XnH xXFKxs6KNDPXJ4UfcLLYCOZ3FcljUxTVt+ehkecXbP6pof14lGrNjXFywUaPSu3BKrTQ kfBNz59XF7c8LThve6MI+TOfYYncTlOvDojO2S7wKP5W/vJcjoMIpZNvT+GljU1R+ghu ZEh3t9e1JJnf3oXaCMvvqONO0cDsJIQoshPSg6LCgJergsDzyv8sxIyVy/JXxduer/74 eCRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QSQG81eRgnpHNzNtYS/UdSJBODcnemsUEEs5gWWXFtQ=; b=pswa52KUsRCrh32UcdP0vIlo2/gKVOeiseKV4hLD0Uurmf75dJjARhuILZzB00rv1g 21a2lmrwbZRrSdm0zPj8FjiCFO/lv5uNUBoRS3ByngcoXY1cyiuEExIi/g9VBag5hyeC GhC79mTE4KKinXST8fxF3gnCD+yGVKe/p+UxU/oomvSpoNo6gCFHPy+ApAfdIgfRboUL 7qidTbRaD0QUpZlJ/nuIUH9titayDjqfHqfq3u1bYkbUZ8fY0NXKEMqkjltAY0MPKi8J TTB4kzF8K5Knay1zPp6G8XePUGrjJ/p0pumjRbclmx85YpqwZ0aHJ8EdQd5Z0A2yCnS6 QISg== X-Gm-Message-State: APjAAAUYY3zBtJK3aL3iXwviuoeqpzUwEaDkd8WPJYLl3JmtE+CdDG3M JoPGFKO3qefpggJRn921cQLC/VNciIY= X-Google-Smtp-Source: APXvYqzIkQjCPt5ys+VVuFRActC5bl7RKIBQNwk0r1wJjQff8mtDPCP9Tls5fT89a4egtuN+6YnlYg== X-Received: by 2002:a7b:c842:: with SMTP id c2mr6534510wml.28.1559128305744; Wed, 29 May 2019 04:11:45 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id f7sm3585403wmc.26.2019.05.29.04.11.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 29 May 2019 04:11:45 -0700 (PDT) Date: Wed, 29 May 2019 12:11:43 +0100 From: "Leif Lindholm" To: devel@edk2.groups.io, zhichao.gao@intel.com Cc: Bret Barkelew , Jian J Wang , Hao A Wu , Ray Ni , Star Zeng , Liming Gao , Sean Brogan , Michael Turner Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/CapsulePei: Optimize the CapsulePei Message-ID: <20190529111143.whfxiphgc3y6jap4@bivouac.eciton.net> References: <20190529004555.45364-1-zhichao.gao@intel.com> MIME-Version: 1.0 In-Reply-To: <20190529004555.45364-1-zhichao.gao@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 29, 2019 at 08:45:55AM +0800, Gao, Zhichao wrote: > From: Bret Barkelew If this code is from Microsoft... > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1853 > > Sperate the capsule check function from GetCapsuleDescriptors > and name it to AreCapsulesStaged. > Rename GetCapsuleDescriptors to GetScatterGatherHeadEntries. > And optimize its to remove the duplicated code. > > Cc: Jian J Wang > Cc: Hao A Wu > Cc: Ray Ni > Cc: Star Zeng > Cc: Liming Gao > Cc: Sean Brogan > Cc: Michael Turner > Cc: Bret Barkelew > Signed-off-by: Zhichao gao > --- > MdeModulePkg/Universal/CapsulePei/Capsule.h | 3 +- > .../Universal/CapsulePei/CapsulePei.inf | 3 +- > .../Universal/CapsulePei/UefiCapsule.c | 357 ++++++++++-------- > 3 files changed, 194 insertions(+), 169 deletions(-) > > diff --git a/MdeModulePkg/Universal/CapsulePei/Capsule.h b/MdeModulePkg/Universal/CapsulePei/Capsule.h > index baf40423af..fc20dd8b92 100644 > --- a/MdeModulePkg/Universal/CapsulePei/Capsule.h > +++ b/MdeModulePkg/Universal/CapsulePei/Capsule.h > @@ -1,6 +1,6 @@ > /** @file > > -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> > SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -30,6 +30,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #include > #include > #include > +#include > #include > #include "Common/CommonHeader.h" > > diff --git a/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf b/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf > index 5d43df3075..9c88b3986f 100644 > --- a/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf > +++ b/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf > @@ -6,7 +6,7 @@ > # This external input must be validated carefully to avoid security issue like > # buffer overflow, integer overflow. > # > -# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
...why does Intel get the copyright? / Leif