From: Ard Biesheuvel <a...@kernel.org> The DumpVars() routine is called directly and via an event notification callback, and the latter therefore defines the function's prototype, even though the arguments are unused.
We will introduce another callback into this logic, but via a reset notifier, which has yet another prototype. So to keep things tidy, drop the formal parameters from DumpVars() and invoke it via a helper function that discards the arguments when called as a event notification callback. We will do the same for the reset notification once that functionality gets added. Signed-off-by: Ard Biesheuvel <a...@kernel.org> Reviewed-by: Leif Lindholm <quic_llind...@quicinc.com> --- Platform/RaspberryPi/Drivers/VarBlockServiceDxe/VarBlockServiceDxe.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Platform/RaspberryPi/Drivers/VarBlockServiceDxe/VarBlockServiceDxe.c b/Platform/RaspberryPi/Drivers/VarBlockServiceDxe/VarBlockServiceDxe.c index d7be37f67af3..006d4ded15e9 100644 --- a/Platform/RaspberryPi/Drivers/VarBlockServiceDxe/VarBlockServiceDxe.c +++ b/Platform/RaspberryPi/Drivers/VarBlockServiceDxe/VarBlockServiceDxe.c @@ -161,10 +161,8 @@ DoDump ( STATIC VOID -EFIAPI DumpVars ( - IN EFI_EVENT Event, - IN VOID *Context + VOID ) { EFI_STATUS Status; @@ -202,6 +200,16 @@ DumpVars ( mFvInstance->Dirty = FALSE; } +STATIC +VOID +EFIAPI +DumpVarsOnEvent ( + IN EFI_EVENT Event, + IN VOID *Context + ) +{ + DumpVars (); +} VOID ReadyToBootHandler ( @@ -216,7 +224,7 @@ ReadyToBootHandler ( Status = gBS->CreateEvent ( EVT_NOTIFY_SIGNAL, TPL_CALLBACK, - DumpVars, + DumpVarsOnEvent, NULL, &ImageInstallEvent ); @@ -229,7 +237,7 @@ ReadyToBootHandler ( ); ASSERT_EFI_ERROR (Status); - DumpVars (NULL, NULL); + DumpVars (); Status = gBS->CloseEvent (Event); ASSERT_EFI_ERROR (Status); } @@ -247,7 +255,7 @@ InstallDumpVarEventHandlers ( Status = gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, TPL_CALLBACK, - DumpVars, + DumpVarsOnEvent, NULL, &gRaspberryPiEventResetGuid, &ResetEvent -- 2.46.0.rc1.232.g9752f9e123-goog -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#120104): https://edk2.groups.io/g/devel/message/120104 Mute This Topic: https://groups.io/mt/107628978/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-