diff mbox series

[edk2,4/8] StandaloneMmPkg/StandaloneMmCoreEntryPoint: remove bogus ASSERT_EFI_ERROR()s

Message ID 20190104110315.18339-5-ard.biesheuvel@linaro.org
State Superseded
Headers show
Series StandaloneMmPkg: assorted fixes and improvements | expand

Commit Message

Ard Biesheuvel Jan. 4, 2019, 11:03 a.m. UTC
ASSERT_EFI_ERROR (x) is a shorthand for ASSERT(!EFI_ERROR(x)), and so
it should only be used with EFI_STATUS type expressions.

So drop two instances that operate on other types, since neither looks
particularly useful.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c | 2 --
 1 file changed, 2 deletions(-)

-- 
2.17.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Supreeth Venkatesh Jan. 4, 2019, 5:52 p.m. UTC | #1
On Fri, 2019-01-04 at 12:03 +0100, Ard Biesheuvel wrote:
> ASSERT_EFI_ERROR (x) is a shorthand for ASSERT(!EFI_ERROR(x)), and so

> it should only be used with EFI_STATUS type expressions.

> 

> So drop two instances that operate on other types, since neither

> looks

> particularly useful.

> 

> Contributed-under: TianoCore Contribution Agreement 1.1

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Reviewed-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>


> ---

>  StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalon

> eMmCoreEntryPoint.c | 2 --

>  1 file changed, 2 deletions(-)

> 

> diff --git

> a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalo

> neMmCoreEntryPoint.c

> b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalo

> neMmCoreEntryPoint.c

> index 05ed6c8dd0b5..5cca532456fd 100644

> ---

> a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalo

> neMmCoreEntryPoint.c

> +++

> b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/Standalo

> neMmCoreEntryPoint.c

> @@ -295,7 +295,6 @@ _ModuleEntryPoint (

>    //

>    ProcessModuleEntryPointList (HobStart);

>  

> -  ASSERT_EFI_ERROR (CpuDriverEntryPoint);

>    DEBUG ((DEBUG_INFO, "Shared Cpu Driver EP 0x%lx\n", (UINT64)

> CpuDriverEntryPoint));

>  

>  finish:

> @@ -303,5 +302,4 @@ finish:

>    InitMmFoundationSvcArgs.Arg0 =

> ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64;

>    InitMmFoundationSvcArgs.Arg1 = Status;

>    DelegatedEventLoop (&InitMmFoundationSvcArgs);

> -  ASSERT_EFI_ERROR (0);

>  }


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
index 05ed6c8dd0b5..5cca532456fd 100644
--- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
+++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/AArch64/StandaloneMmCoreEntryPoint.c
@@ -295,7 +295,6 @@  _ModuleEntryPoint (
   //
   ProcessModuleEntryPointList (HobStart);
 
-  ASSERT_EFI_ERROR (CpuDriverEntryPoint);
   DEBUG ((DEBUG_INFO, "Shared Cpu Driver EP 0x%lx\n", (UINT64) CpuDriverEntryPoint));
 
 finish:
@@ -303,5 +302,4 @@  finish:
   InitMmFoundationSvcArgs.Arg0 = ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64;
   InitMmFoundationSvcArgs.Arg1 = Status;
   DelegatedEventLoop (&InitMmFoundationSvcArgs);
-  ASSERT_EFI_ERROR (0);
 }