[PATCH 07/43] OvmfPkg/AcpiPlatformDxe: sort #includes and [LibraryClasses] #includes


Laszlo Ersek
 

Place all public #includes first, all module-private #includes second.
Separate them with a single empty line. Keep each section sorted in
itself.

Sort all sections in both INF files.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 18 +++++++++---------
OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf | 2 +-
OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h | 15 ++++++---------
OvmfPkg/AcpiPlatformDxe/EntryPoint.c | 1 +
OvmfPkg/AcpiPlatformDxe/Qemu.c | 11 ++++++-----
OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 12 ++++++------
OvmfPkg/AcpiPlatformDxe/Xen.c | 3 ++-
7 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf b/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
index e486b8afa56d..4522d7f6110c 100644
--- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
@@ -29,30 +29,30 @@ [Sources]
Qemu.c
QemuFwCfgAcpi.c
QemuLoader.h
Xen.c

[Packages]
- MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
+ MdePkg/MdePkg.dec
OvmfPkg/OvmfPkg.dec
UefiCpuPkg/UefiCpuPkg.dec

[LibraryClasses]
- UefiLib
- PcdLib
+ BaseLib
BaseMemoryLib
DebugLib
- UefiBootServicesTableLib
- UefiDriverEntryPoint
- QemuFwCfgLib
- QemuFwCfgS3Lib
- MemoryAllocationLib
- BaseLib
DxeServicesTableLib
+ MemoryAllocationLib
OrderedCollectionLib
+ PcdLib
+ QemuFwCfgLib
+ QemuFwCfgS3Lib
+ UefiBootServicesTableLib
+ UefiDriverEntryPoint
+ UefiLib
XenPlatformLib

[Protocols]
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiFirmwareVolume2ProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
gEfiPciIoProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf
index c9ec4f60bc78..cc24f35bd83a 100644
--- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf
+++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf
@@ -27,14 +27,14 @@ [Sources]
PciDecoding.c
QemuFwCfgAcpi.c
QemuFwCfgAcpiPlatform.c
QemuLoader.h

[Packages]
- MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
+ MdePkg/MdePkg.dec
OvmfPkg/OvmfPkg.dec

[LibraryClasses]
BaseLib
DebugLib
MemoryAllocationLib
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
index c8dee8ab7a3c..511a30782f6d 100644
--- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
+++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h
@@ -6,25 +6,22 @@

**/

#ifndef ACPI_PLATFORM_H_
#define ACPI_PLATFORM_H_

-#include <PiDxe.h>
-
-#include <Protocol/AcpiTable.h>
-#include <Protocol/FirmwareVolume2.h>
-#include <Protocol/PciIo.h>
-
+#include <IndustryStandard/Acpi.h>
#include <Library/BaseLib.h>
-#include <Library/UefiBootServicesTableLib.h>
#include <Library/DebugLib.h>
#include <Library/PcdLib.h>
+#include <Library/UefiBootServicesTableLib.h>
#include <Library/XenPlatformLib.h>
-
-#include <IndustryStandard/Acpi.h>
+#include <PiDxe.h>
+#include <Protocol/AcpiTable.h>
+#include <Protocol/FirmwareVolume2.h>
+#include <Protocol/PciIo.h>

typedef struct {
EFI_PCI_IO_PROTOCOL *PciIo;
UINT64 PciAttributes;
} ORIGINAL_ATTRIBUTES;

diff --git a/OvmfPkg/AcpiPlatformDxe/EntryPoint.c b/OvmfPkg/AcpiPlatformDxe/EntryPoint.c
index f66f89291157..fb07ed85373d 100644
--- a/OvmfPkg/AcpiPlatformDxe/EntryPoint.c
+++ b/OvmfPkg/AcpiPlatformDxe/EntryPoint.c
@@ -5,12 +5,13 @@
Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>

SPDX-License-Identifier: BSD-2-Clause-Patent
**/

#include <Guid/RootBridgesConnectedEventGroup.h>
+
#include "AcpiPlatform.h"

STATIC
EFI_ACPI_TABLE_PROTOCOL *
FindAcpiTableProtocol (
VOID
diff --git a/OvmfPkg/AcpiPlatformDxe/Qemu.c b/OvmfPkg/AcpiPlatformDxe/Qemu.c
index 7fb42270043f..bed3b16159a6 100644
--- a/OvmfPkg/AcpiPlatformDxe/Qemu.c
+++ b/OvmfPkg/AcpiPlatformDxe/Qemu.c
@@ -6,20 +6,21 @@
Copyright (C) 2012-2014, Red Hat, Inc.

SPDX-License-Identifier: BSD-2-Clause-Patent

**/

-#include "AcpiPlatform.h"
+#include <IndustryStandard/Acpi.h>
#include <Library/BaseMemoryLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/QemuFwCfgLib.h>
#include <Library/DxeServicesTableLib.h>
-#include <Library/PcdLib.h>
+#include <Library/MemoryAllocationLib.h>
#include <Library/OrderedCollectionLib.h>
-#include <IndustryStandard/Acpi.h>
+#include <Library/PcdLib.h>
+#include <Library/QemuFwCfgLib.h>
+
+#include "AcpiPlatform.h"

BOOLEAN
QemuDetected (
VOID
)
{
diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
index b62027db6e66..c07b84a21385 100644
--- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
+++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
@@ -5,23 +5,23 @@
Copyright (C) 2012-2014, Red Hat, Inc.

SPDX-License-Identifier: BSD-2-Clause-Patent

**/

-#include "AcpiPlatform.h"
-#include "QemuLoader.h"
+#include <IndustryStandard/Acpi.h>
#include <Library/BaseMemoryLib.h>
+#include <Library/DxeServicesTableLib.h>
#include <Library/MemoryAllocationLib.h>
+#include <Library/OrderedCollectionLib.h>
+#include <Library/PcdLib.h>
#include <Library/QemuFwCfgLib.h>
#include <Library/QemuFwCfgS3Lib.h>
-#include <Library/DxeServicesTableLib.h>
-#include <Library/PcdLib.h>
-#include <Library/OrderedCollectionLib.h>
-#include <IndustryStandard/Acpi.h>

+#include "AcpiPlatform.h"
+#include "QemuLoader.h"

//
// The user structure for the ordered collection that will track the fw_cfg
// blobs under processing.
//
typedef struct {
diff --git a/OvmfPkg/AcpiPlatformDxe/Xen.c b/OvmfPkg/AcpiPlatformDxe/Xen.c
index 289ef971c4b8..1d69989042c6 100644
--- a/OvmfPkg/AcpiPlatformDxe/Xen.c
+++ b/OvmfPkg/AcpiPlatformDxe/Xen.c
@@ -5,15 +5,16 @@
Copyright (c) 2012, Bei Guan <gbtju85@gmail.com>

SPDX-License-Identifier: BSD-2-Clause-Patent

**/

-#include "AcpiPlatform.h"
#include <Library/BaseLib.h>

+#include "AcpiPlatform.h"
+
#define XEN_ACPI_PHYSICAL_ADDRESS 0x000EA020
#define XEN_BIOS_PHYSICAL_END 0x000FFFFF

EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER *XenAcpiRsdpStructurePtr = NULL;

/**
--
2.19.1.3.g30247aa5d201

Join devel@edk2.groups.io to automatically receive all group messages.