summaryrefslogtreecommitdiffstats
path: root/PrmPkg/PrmConfigDxe/PrmConfigDxe.c
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2020-06-16 09:32:38 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-04-05 00:42:38 +0000
commite10c776487b431e59fb35999d954ea8057aa2b30 (patch)
treef277cf1e5d4d8b249d09970475427445bfcf7cb7 /PrmPkg/PrmConfigDxe/PrmConfigDxe.c
parent4348c72ad0328fcf8ef37930cf51a5dbc2388038 (diff)
downloadedk2-e10c776487b431e59fb35999d954ea8057aa2b30.tar.gz
edk2-e10c776487b431e59fb35999d954ea8057aa2b30.tar.bz2
edk2-e10c776487b431e59fb35999d954ea8057aa2b30.zip
PrmPkg: Enforce stricter types
Makes the following changes to enforce stricter types: 1. PrmPkg/PrmConfigDxe The function PrmConfigEndOfDxeNotification () is used as a notify function (of type EFI_EVENT_NOTIFY), however it has a return type of EFI_STATUS whereas the return type should actually be VOID. 2. PrmPkg/PrmLoaderDxe Updates the following types to be more accurate than were allowed in the VS compiler: * 3rd actual argument given to GetModuleContextBuffers () is explicitly marked as CONST PRM_MODULE_CONTEXT_BUFFERS ** * 3rd actual argument given to GetContextBuffer () is explicitly marked as CONST PRM_CONTEXT_BUFFER ** * PrmLoaderEndOfDxeNotification () return type is changed to VOID to align with the EFI_EVENT_NOTIFY type 3. PrmPkg/Application/PrmInfo Updates the following types to be more accurate than were allowed in the VS compiler: * SHELL_STATUS in ParseParameterList () is now EFI_STATUS * 3rd actual argument given to GetModuleContextBuffers () is explicitly marked as CONST PRM_MODULE_CONTEXT_BUFFERS ** * 3rd actual argument given to GetContextBuffer () is explicitly marked as CONST PRM_CONTEXT_BUFFER ** Cc: Andrew Fish <afish@apple.com> Cc: Kang Gao <kang.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Liu Yun <yun.y.liu@intel.com> Cc: Ankit Sinha <ankit.sinha@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Acked-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Liming Gao <gaoliming@byosoft.com.cn> Acked-by: Leif Lindholm <quic_llindhol@quicinc.com> Reviewed-by: Ankit Sinha <ankit.sinha@intel.com>
Diffstat (limited to 'PrmPkg/PrmConfigDxe/PrmConfigDxe.c')
-rw-r--r--PrmPkg/PrmConfigDxe/PrmConfigDxe.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/PrmPkg/PrmConfigDxe/PrmConfigDxe.c b/PrmPkg/PrmConfigDxe/PrmConfigDxe.c
index c547db3eca..f3223d63de 100644
--- a/PrmPkg/PrmConfigDxe/PrmConfigDxe.c
+++ b/PrmPkg/PrmConfigDxe/PrmConfigDxe.c
@@ -361,10 +361,8 @@ PrmConfigVirtualAddressChangeEvent (
@param[in] Context The pointer to the notification function's context,
which is implementation-dependent.
- @retval EFI_SUCCESS The function executed successfully
-
**/
-EFI_STATUS
+VOID
EFIAPI
PrmConfigEndOfDxeNotification (
IN EFI_EVENT Event,
@@ -446,8 +444,6 @@ PrmConfigEndOfDxeNotification (
gBS->FreePool (HandleBuffer);
}
gBS->CloseEvent(Event);
-
- return EFI_SUCCESS;
}
/**
@@ -476,7 +472,7 @@ PrmConfigEntryPoint (
// Register a notification function to change memory attributes at end of DXE
//
Event = NULL;
- Status = gBS->CreateEventEx(
+ Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL,
TPL_CALLBACK,
PrmConfigEndOfDxeNotification,