From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::144; helo=mail-it1-x144.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x144.google.com (mail-it1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DC42E211B7F88 for ; Mon, 21 Jan 2019 08:16:22 -0800 (PST) Received: by mail-it1-x144.google.com with SMTP id h193so15895256ita.5 for ; Mon, 21 Jan 2019 08:16:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QaUgfqR7YK6NtyKYB3rNy6/AeMOg2iHyNOdry1PpeHk=; b=U50fB3dGfFA9WtHysFA0OS0dxHxepAVEJ+Xt0d5+yDEcsb2PdxEAT6bZOekJSjlgzm j4Xwc3pke7yo3T1/trx/6sAuk5UEji7i80qP/HdSBvByvMomzHM6CVN8QSyn3qN/Iirl fkM+5+ZRpWjy4yiLoXXNYHcem+C2+vxN6ZqRk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QaUgfqR7YK6NtyKYB3rNy6/AeMOg2iHyNOdry1PpeHk=; b=HFFNVho/Am2Lvl3djCSo8c59GlxcCJJL5jFWwz5h6qL7VBPR3RK+2JqpvzA8eF8dCc nbwe+Go1p1fRu2nLVf3AhaEnkM+qlOpV4a5Lh7RMD8thWyaDbflvq/F90mDNzjm6Ywoa wuwnuw+gdhFitAXqm4Duk1ep+sGi7nXd0YMIujXWjAr5dTUkefFxuhmFtpVUMKxm72fH i8wN+O35sgtFBeFbIqgulRFXbIxAWctSxRb7hxiPQXLiY+9DUfJkoI2lbSy9VTmWDMUK 2F2vNk7Ve+RopatcSPC1fapIHOM3qvL3WSHKrXYZTeZOPldN44ZCyS/rf6GMbvdbWniM /EjQ== X-Gm-Message-State: AJcUukeQZmfD4ZMBa3Cux60BypHO+Fb+1TKDPqoRnYankEDspx1RzICI cmThTJhRw7FY5tEJy+5nvVikGm5IvIPeXbBuFy6zjA== X-Google-Smtp-Source: ALg8bN67iWm+2h0gaKYDCKrUquo1KWRvwY4ZkNb9VN0yrxnFe10DjRfg/dPOWb90E00rW3lPQwm++xCs2pHxRbElAak= X-Received: by 2002:a02:734b:: with SMTP id a11mr16670996jae.62.1548087381514; Mon, 21 Jan 2019 08:16:21 -0800 (PST) MIME-Version: 1.0 References: <20190104144336.8941-1-ard.biesheuvel@linaro.org> <20190104144336.8941-3-ard.biesheuvel@linaro.org> <20190117101000.hsesfat7kcie7yuu@bivouac.eciton.net> In-Reply-To: From: Ard Biesheuvel Date: Mon, 21 Jan 2019 17:16:09 +0100 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" , Masahisa Kojima Subject: Re: [PATCH edk2-platforms 2/7] Silicon/SynQuacer/Fip006Dxe: factor out DXE specific pieces 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, 21 Jan 2019 16:16:23 -0000 Content-Type: text/plain; charset="UTF-8" On Thu, 17 Jan 2019 at 12:27, Ard Biesheuvel wrote: > > On Thu, 17 Jan 2019 at 11:10, Leif Lindholm wrote: > > > > On Fri, Jan 04, 2019 at 03:43:31PM +0100, Ard Biesheuvel wrote: > > > In preparation of creating a SMM version of the FIP006 NOR flash > > > driver, refactor the existing pieces into a core driver, the FVB > > > methods and the DXE instantiation code. > > > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > > Signed-off-by: Ard Biesheuvel > > > > I only have one nitpicky question on this patch: > > > > > --- > > > Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/Fip006Dxe.inf | 6 +- > > > Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlash.c | 1006 +++++++++++++++++ > > > Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/{NorFlashDxe.h => NorFlash.h} | 52 +- > > > Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c | 1150 +++----------------- > > > Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/{NorFlashFvbDxe.c => NorFlashFvb.c} | 161 +-- > > > 5 files changed, 1194 insertions(+), 1181 deletions(-) > > > > > > > > diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.h b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlash.h > > > similarity index 88% > > > rename from Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.h > > > rename to Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlash.h > > > index 20e74b0320ce..61b8e6a08fa0 100644 > > > --- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.h > > > +++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlash.h > > > @@ -27,11 +27,9 @@ > > > #include > > > > > > #include > > > -#include > > > #include > > > +#include > > > > Why add this include? > > I'm not going to ask to move out the existing headers not actually > > used by this file, but could we avoid adding new ones? > > > > https://edk2-docs.gitbooks.io/edk-ii-c-coding-standards-specification/content/v/release/2.20/5_source_files/53_include_files.html#534-include-files-may-include-only-those-headers-that-it-directly-depends-upon > > is actually a rule I agree with. > > > > But also, aren't all of the users of this file already manually > > including this one? > > > > Fair enough. I will drop the include here, and add it to whichever > source file requires it afterwards. > That include turns out to be entirely redundant, so I will just drop it. > > > #include > > > -#include > > > -#include > > > > > > #include "Fip006Reg.h" > > > > > > > > diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c > > > index e52ab52d8cf7..6c07799b22d8 100644 > > > --- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c > > > +++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c > > > @@ -15,15 +15,16 @@ > > > **/ > > > > > > #include > > > +#include > > > +#include > > > #include > > > > At least this one does. > > > > > #include > > > #include > > > #include > > > #include > > > +#include > > > > > > -#include "NorFlashDxe.h" > > > - > > > -STATIC EFI_EVENT mNorFlashVirtualAddrChangeEvent; > > > +#include "NorFlash.h"