From a550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97 Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Sun, 5 Dec 2021 14:53:57 -0800 Subject: EmulatorPkg: Apply uncrustify changes REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the EmulatorPkg package Cc: Andrew Fish Cc: Leif Lindholm Cc: Michael D Kinney Signed-off-by: Michael Kubacki Reviewed-by: Ray Ni --- EmulatorPkg/CpuRuntimeDxe/CpuIo.c | 77 ++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 38 deletions(-) (limited to 'EmulatorPkg/CpuRuntimeDxe/CpuIo.c') diff --git a/EmulatorPkg/CpuRuntimeDxe/CpuIo.c b/EmulatorPkg/CpuRuntimeDxe/CpuIo.c index 152c260451..417b225b7e 100644 --- a/EmulatorPkg/CpuRuntimeDxe/CpuIo.c +++ b/EmulatorPkg/CpuRuntimeDxe/CpuIo.c @@ -31,22 +31,23 @@ SPDX-License-Identifier: BSD-2-Clause-Patent EFI_STATUS CpuIoCheckAddressRange ( - IN EFI_CPU_IO_PROTOCOL_WIDTH Width, - IN UINT64 Address, - IN UINTN Count, - IN VOID *Buffer, - IN UINT64 Limit + IN EFI_CPU_IO_PROTOCOL_WIDTH Width, + IN UINT64 Address, + IN UINTN Count, + IN VOID *Buffer, + IN UINT64 Limit ); EFI_STATUS EFIAPI CpuMemoryServiceRead ( - IN EFI_CPU_IO2_PROTOCOL *This, - IN EFI_CPU_IO_PROTOCOL_WIDTH Width, - IN UINT64 Address, - IN UINTN Count, - IN OUT VOID *Buffer + IN EFI_CPU_IO2_PROTOCOL *This, + IN EFI_CPU_IO_PROTOCOL_WIDTH Width, + IN UINT64 Address, + IN UINTN Count, + IN OUT VOID *Buffer ) + /*++ Routine Description: @@ -95,12 +96,13 @@ Returns: EFI_STATUS EFIAPI CpuMemoryServiceWrite ( - IN EFI_CPU_IO2_PROTOCOL *This, - IN EFI_CPU_IO_PROTOCOL_WIDTH Width, - IN UINT64 Address, - IN UINTN Count, - IN OUT VOID *Buffer + IN EFI_CPU_IO2_PROTOCOL *This, + IN EFI_CPU_IO_PROTOCOL_WIDTH Width, + IN UINT64 Address, + IN UINTN Count, + IN OUT VOID *Buffer ) + /*++ Routine Description: @@ -148,12 +150,13 @@ Returns: EFI_STATUS EFIAPI CpuIoServiceRead ( - IN EFI_CPU_IO2_PROTOCOL *This, - IN EFI_CPU_IO_PROTOCOL_WIDTH Width, - IN UINT64 UserAddress, - IN UINTN Count, - IN OUT VOID *UserBuffer + IN EFI_CPU_IO2_PROTOCOL *This, + IN EFI_CPU_IO_PROTOCOL_WIDTH Width, + IN UINT64 UserAddress, + IN UINTN Count, + IN OUT VOID *UserBuffer ) + /*++ Routine Description: @@ -186,7 +189,7 @@ Returns: return EFI_INVALID_PARAMETER; } - Address = (UINTN) UserAddress; + Address = (UINTN)UserAddress; if (Width >= EfiCpuIoWidthMaximum) { return EFI_INVALID_PARAMETER; @@ -206,12 +209,13 @@ Returns: EFI_STATUS EFIAPI CpuIoServiceWrite ( - IN EFI_CPU_IO2_PROTOCOL *This, - IN EFI_CPU_IO_PROTOCOL_WIDTH Width, - IN UINT64 UserAddress, - IN UINTN Count, - IN OUT VOID *UserBuffer + IN EFI_CPU_IO2_PROTOCOL *This, + IN EFI_CPU_IO_PROTOCOL_WIDTH Width, + IN UINT64 UserAddress, + IN UINTN Count, + IN OUT VOID *UserBuffer ) + /*++ Routine Description: @@ -248,7 +252,7 @@ Returns: return EFI_INVALID_PARAMETER; } - Address = (UINTN) UserAddress; + Address = (UINTN)UserAddress; if (Width >= EfiCpuIoWidthMaximum) { return EFI_INVALID_PARAMETER; @@ -265,7 +269,6 @@ Returns: return EFI_SUCCESS; } - /*++ Routine Description: @@ -288,14 +291,14 @@ Returns: **/ EFI_STATUS CpuIoCheckAddressRange ( - IN EFI_CPU_IO_PROTOCOL_WIDTH Width, - IN UINT64 Address, - IN UINTN Count, - IN VOID *Buffer, - IN UINT64 Limit + IN EFI_CPU_IO_PROTOCOL_WIDTH Width, + IN UINT64 Address, + IN UINTN Count, + IN VOID *Buffer, + IN UINT64 Limit ) { - UINTN AlignMask; + UINTN AlignMask; if (Address > Limit) { return EFI_UNSUPPORTED; @@ -304,7 +307,7 @@ CpuIoCheckAddressRange ( // // For FiFo type, the target address won't increase during the access, so treat count as 1 // - if (Width >= EfiCpuIoWidthFifoUint8 && Width <= EfiCpuIoWidthFifoUint64) { + if ((Width >= EfiCpuIoWidthFifoUint8) && (Width <= EfiCpuIoWidthFifoUint64)) { Count = 1; } @@ -314,11 +317,9 @@ CpuIoCheckAddressRange ( } AlignMask = (1 << Width) - 1; - if ((UINTN) Buffer & AlignMask) { + if ((UINTN)Buffer & AlignMask) { return EFI_UNSUPPORTED; } return EFI_SUCCESS; } - - -- cgit