]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/IoMmuDxe: clean up used library classes
authorLaszlo Ersek <lersek@redhat.com>
Wed, 2 Aug 2017 10:11:50 +0000 (12:11 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 4 Aug 2017 23:31:53 +0000 (01:31 +0200)
The following library classes are not used by this module, so remove them
from the INF file's [LibraryClasses] section:
- DxeServicesTableLib
- UefiLib

The following library classes are used by this module, so add them to the
INF file's [LibraryClasses] section:
- BaseMemoryLib (e.g. via CopyMem())
- MemoryAllocationLib (e.g. via AllocatePool())

Sort the list of library classes (in both "IoMmuDxe.inf" and
"AmdSevIoMmu.h").

Remove all non-local #include directives from "IoMmuDxe.c"; both C files
of this module include "AmdSevIoMmu.h", and "AmdSevIoMmu.h" includes all
non-local headers already.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
OvmfPkg/IoMmuDxe/AmdSevIoMmu.h
OvmfPkg/IoMmuDxe/IoMmuDxe.c
OvmfPkg/IoMmuDxe/IoMmuDxe.inf

index 17d3694e4a84943de7706719a9f519d0f1ce5cb5..c15fa76c3c1bfcec1eae7ae1a236ed32aeda0c13 100644 (file)
 #include <Protocol/IoMmu.h>\r
 \r
 #include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/MemEncryptSevLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/MemEncryptSevLib.h>\r
 \r
 /**\r
   Install IOMMU protocol to provide the DMA support for PciHostBridge and\r
index 0ea42cbc13cee853b2ad23c1b0de4ce106c287f7..70d30ea916278907d6d0947b2f3dfdbf0310f7b3 100644 (file)
 \r
 **/\r
 \r
-#include <PiDxe.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/MemEncryptSevLib.h>\r
-\r
 #include "AmdSevIoMmu.h"\r
 \r
 EFI_STATUS\r
index 21dc39b9233a77fc9ee91db0690f678418b38265..307849706800ea7ed2ad97cde995945b363564bc 100644 (file)
 \r
 [LibraryClasses]\r
   BaseLib\r
-  UefiLib\r
-  UefiDriverEntryPoint\r
-  UefiBootServicesTableLib\r
-  DxeServicesTableLib\r
+  BaseMemoryLib\r
   DebugLib\r
   MemEncryptSevLib\r
+  MemoryAllocationLib\r
+  UefiBootServicesTableLib\r
+  UefiDriverEntryPoint\r
 \r
 [Protocols]\r
   gEdkiiIoMmuProtocolGuid                     ## SOMETIME_PRODUCES\r