OvmfPkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the OvmfPkg package

Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Andrew Fish <afish@apple.com>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:09 -08:00
committed by mergify[bot]
parent d1050b9dff
commit ac0a286f4d
445 changed files with 30894 additions and 26369 deletions

View File

@@ -22,12 +22,12 @@
#include <Protocol/SimpleNetwork.h>
#include <Library/OrderedCollectionLib.h>
#define VNET_SIG SIGNATURE_32 ('V', 'N', 'E', 'T')
#define VNET_SIG SIGNATURE_32 ('V', 'N', 'E', 'T')
//
// maximum number of pending packets, separately for each direction
//
#define VNET_MAX_PENDING 64
#define VNET_MAX_PENDING 64
//
// State diagram:
@@ -69,36 +69,35 @@ typedef struct {
//
// field init function
// ------------------ ------------------------------
UINT32 Signature; // VirtioNetDriverBindingStart
VIRTIO_DEVICE_PROTOCOL *VirtIo; // VirtioNetDriverBindingStart
EFI_SIMPLE_NETWORK_PROTOCOL Snp; // VirtioNetSnpPopulate
EFI_SIMPLE_NETWORK_MODE Snm; // VirtioNetSnpPopulate
EFI_EVENT ExitBoot; // VirtioNetSnpPopulate
EFI_DEVICE_PATH_PROTOCOL *MacDevicePath; // VirtioNetDriverBindingStart
EFI_HANDLE MacHandle; // VirtioNetDriverBindingStart
UINT32 Signature; // VirtioNetDriverBindingStart
VIRTIO_DEVICE_PROTOCOL *VirtIo; // VirtioNetDriverBindingStart
EFI_SIMPLE_NETWORK_PROTOCOL Snp; // VirtioNetSnpPopulate
EFI_SIMPLE_NETWORK_MODE Snm; // VirtioNetSnpPopulate
EFI_EVENT ExitBoot; // VirtioNetSnpPopulate
EFI_DEVICE_PATH_PROTOCOL *MacDevicePath; // VirtioNetDriverBindingStart
EFI_HANDLE MacHandle; // VirtioNetDriverBindingStart
VRING RxRing; // VirtioNetInitRing
VOID *RxRingMap; // VirtioRingMap and
// VirtioNetInitRing
UINT8 *RxBuf; // VirtioNetInitRx
UINT16 RxLastUsed; // VirtioNetInitRx
UINTN RxBufNrPages; // VirtioNetInitRx
EFI_PHYSICAL_ADDRESS RxBufDeviceBase; // VirtioNetInitRx
VOID *RxBufMap; // VirtioNetInitRx
VRING RxRing; // VirtioNetInitRing
VOID *RxRingMap; // VirtioRingMap and
// VirtioNetInitRing
UINT8 *RxBuf; // VirtioNetInitRx
UINT16 RxLastUsed; // VirtioNetInitRx
UINTN RxBufNrPages; // VirtioNetInitRx
EFI_PHYSICAL_ADDRESS RxBufDeviceBase; // VirtioNetInitRx
VOID *RxBufMap; // VirtioNetInitRx
VRING TxRing; // VirtioNetInitRing
VOID *TxRingMap; // VirtioRingMap and
// VirtioNetInitRing
UINT16 TxMaxPending; // VirtioNetInitTx
UINT16 TxCurPending; // VirtioNetInitTx
UINT16 *TxFreeStack; // VirtioNetInitTx
VIRTIO_1_0_NET_REQ *TxSharedReq; // VirtioNetInitTx
VOID *TxSharedReqMap; // VirtioNetInitTx
UINT16 TxLastUsed; // VirtioNetInitTx
ORDERED_COLLECTION *TxBufCollection; // VirtioNetInitTx
VRING TxRing; // VirtioNetInitRing
VOID *TxRingMap; // VirtioRingMap and
// VirtioNetInitRing
UINT16 TxMaxPending; // VirtioNetInitTx
UINT16 TxCurPending; // VirtioNetInitTx
UINT16 *TxFreeStack; // VirtioNetInitTx
VIRTIO_1_0_NET_REQ *TxSharedReq; // VirtioNetInitTx
VOID *TxSharedReqMap; // VirtioNetInitTx
UINT16 TxLastUsed; // VirtioNetInitTx
ORDERED_COLLECTION *TxBufCollection; // VirtioNetInitTx
} VNET_DEV;
//
// In order to avoid duplication of interface documentation, please find all
// leading comments near the respective function / variable definitions (not
@@ -119,7 +118,7 @@ typedef struct {
(Value) \
))
#define VIRTIO_CFG_READ(Dev, Field, Pointer) ((Dev)->VirtIo->ReadDevice ( \
#define VIRTIO_CFG_READ(Dev, Field, Pointer) ((Dev)->VirtIo->ReadDevice ( \
(Dev)->VirtIo, \
OFFSET_OF_VNET (Field), \
SIZE_OF_VNET (Field), \
@@ -130,13 +129,13 @@ typedef struct {
//
// component naming
//
extern EFI_COMPONENT_NAME_PROTOCOL gVirtioNetComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gVirtioNetComponentName2;
extern EFI_COMPONENT_NAME_PROTOCOL gVirtioNetComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gVirtioNetComponentName2;
//
// driver binding
//
extern EFI_DRIVER_BINDING_PROTOCOL gVirtioNetDriverBinding;
extern EFI_DRIVER_BINDING_PROTOCOL gVirtioNetDriverBinding;
//
// member functions implementing the Simple Network Protocol
@@ -144,113 +143,113 @@ extern EFI_DRIVER_BINDING_PROTOCOL gVirtioNetDriverBinding;
EFI_STATUS
EFIAPI
VirtioNetStart (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
);
EFI_STATUS
EFIAPI
VirtioNetStop (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
);
EFI_STATUS
EFIAPI
VirtioNetInitialize (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINTN ExtraRxBufferSize OPTIONAL,
IN UINTN ExtraTxBufferSize OPTIONAL
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINTN ExtraRxBufferSize OPTIONAL,
IN UINTN ExtraTxBufferSize OPTIONAL
);
EFI_STATUS
EFIAPI
VirtioNetReset (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
);
EFI_STATUS
EFIAPI
VirtioNetShutdown (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
IN EFI_SIMPLE_NETWORK_PROTOCOL *This
);
EFI_STATUS
EFIAPI
VirtioNetReceiveFilters (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINT32 Enable,
IN UINT32 Disable,
IN BOOLEAN ResetMCastFilter,
IN UINTN MCastFilterCnt OPTIONAL,
IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINT32 Enable,
IN UINT32 Disable,
IN BOOLEAN ResetMCastFilter,
IN UINTN MCastFilterCnt OPTIONAL,
IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
);
EFI_STATUS
EFIAPI
VirtioNetStationAddress (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN Reset,
IN EFI_MAC_ADDRESS *New OPTIONAL
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN Reset,
IN EFI_MAC_ADDRESS *New OPTIONAL
);
EFI_STATUS
EFIAPI
VirtioNetStatistics (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN Reset,
IN OUT UINTN *StatisticsSize OPTIONAL,
OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN Reset,
IN OUT UINTN *StatisticsSize OPTIONAL,
OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
);
EFI_STATUS
EFIAPI
VirtioNetMcastIpToMac (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN IPv6,
IN EFI_IP_ADDRESS *Ip,
OUT EFI_MAC_ADDRESS *Mac
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN IPv6,
IN EFI_IP_ADDRESS *Ip,
OUT EFI_MAC_ADDRESS *Mac
);
EFI_STATUS
EFIAPI
VirtioNetNvData (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN ReadWrite,
IN UINTN Offset,
IN UINTN BufferSize,
IN OUT VOID *Buffer
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN BOOLEAN ReadWrite,
IN UINTN Offset,
IN UINTN BufferSize,
IN OUT VOID *Buffer
);
EFI_STATUS
EFIAPI
VirtioNetGetStatus (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
OUT UINT32 *InterruptStatus OPTIONAL,
OUT VOID **TxBuf OPTIONAL
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
OUT UINT32 *InterruptStatus OPTIONAL,
OUT VOID **TxBuf OPTIONAL
);
EFI_STATUS
EFIAPI
VirtioNetTransmit (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINTN HeaderSize,
IN UINTN BufferSize,
IN /* +OUT! */ VOID *Buffer,
IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
IN UINT16 *Protocol OPTIONAL
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
IN UINTN HeaderSize,
IN UINTN BufferSize,
IN /* +OUT! */ VOID *Buffer,
IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
IN UINT16 *Protocol OPTIONAL
);
EFI_STATUS
EFIAPI
VirtioNetReceive (
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
OUT UINTN *HeaderSize OPTIONAL,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer,
OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
OUT UINT16 *Protocol OPTIONAL
IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
OUT UINTN *HeaderSize OPTIONAL,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer,
OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
OUT UINT16 *Protocol OPTIONAL
);
//
@@ -259,21 +258,21 @@ VirtioNetReceive (
VOID
EFIAPI
VirtioNetShutdownRx (
IN OUT VNET_DEV *Dev
IN OUT VNET_DEV *Dev
);
VOID
EFIAPI
VirtioNetShutdownTx (
IN OUT VNET_DEV *Dev
IN OUT VNET_DEV *Dev
);
VOID
EFIAPI
VirtioNetUninitRing (
IN OUT VNET_DEV *Dev,
IN OUT VRING *Ring,
IN VOID *RingMap
IN OUT VNET_DEV *Dev,
IN OUT VRING *Ring,
IN VOID *RingMap
);
//
@@ -300,33 +299,32 @@ VirtioNetUnmapTxBuf (
INTN
EFIAPI
VirtioNetTxBufMapInfoCompare (
IN CONST VOID *UserStruct1,
IN CONST VOID *UserStruct2
IN CONST VOID *UserStruct1,
IN CONST VOID *UserStruct2
);
INTN
EFIAPI
VirtioNetTxBufDeviceAddressCompare (
IN CONST VOID *StandaloneKey,
IN CONST VOID *UserStruct
IN CONST VOID *StandaloneKey,
IN CONST VOID *UserStruct
);
//
// event callbacks
//
VOID
EFIAPI
VirtioNetIsPacketAvailable (
IN EFI_EVENT Event,
IN VOID *Context
IN EFI_EVENT Event,
IN VOID *Context
);
VOID
EFIAPI
VirtioNetExitBoot (
IN EFI_EVENT Event,
IN VOID *Context
IN EFI_EVENT Event,
IN VOID *Context
);
#endif // _VIRTIO_NET_DXE_H_