MdeModulePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdeModulePkg 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: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
7c7184e201
commit
1436aea4d5
@@ -10,7 +10,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#include "UsbPeim.h"
|
||||
#include "PeiUsbLib.h"
|
||||
|
||||
|
||||
/**
|
||||
Clear a given usb feature.
|
||||
|
||||
@@ -27,11 +26,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
EFI_STATUS
|
||||
PeiUsbClearDeviceFeature (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN PEI_USB_IO_PPI *UsbIoPpi,
|
||||
IN EFI_USB_RECIPIENT Recipient,
|
||||
IN UINT16 Value,
|
||||
IN UINT16 Target
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN PEI_USB_IO_PPI *UsbIoPpi,
|
||||
IN EFI_USB_RECIPIENT Recipient,
|
||||
IN UINT16 Value,
|
||||
IN UINT16 Target
|
||||
)
|
||||
{
|
||||
EFI_USB_DEVICE_REQUEST DevReq;
|
||||
@@ -39,23 +38,23 @@ PeiUsbClearDeviceFeature (
|
||||
ASSERT (UsbIoPpi != NULL);
|
||||
|
||||
switch (Recipient) {
|
||||
case EfiUsbDevice:
|
||||
DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_D;
|
||||
break;
|
||||
case EfiUsbDevice:
|
||||
DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_D;
|
||||
break;
|
||||
|
||||
case EfiUsbInterface:
|
||||
DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_I;
|
||||
break;
|
||||
case EfiUsbInterface:
|
||||
DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_I;
|
||||
break;
|
||||
|
||||
case EfiUsbEndpoint:
|
||||
DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_E;
|
||||
break;
|
||||
case EfiUsbEndpoint:
|
||||
DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_E;
|
||||
break;
|
||||
}
|
||||
|
||||
DevReq.Request = USB_DEV_CLEAR_FEATURE;
|
||||
DevReq.Value = Value;
|
||||
DevReq.Index = Target;
|
||||
DevReq.Length = 0;
|
||||
DevReq.Request = USB_DEV_CLEAR_FEATURE;
|
||||
DevReq.Value = Value;
|
||||
DevReq.Index = Target;
|
||||
DevReq.Length = 0;
|
||||
|
||||
return UsbIoPpi->UsbControlTransfer (
|
||||
PeiServices,
|
||||
@@ -68,7 +67,6 @@ PeiUsbClearDeviceFeature (
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Clear Endpoint Halt.
|
||||
|
||||
@@ -83,9 +81,9 @@ PeiUsbClearDeviceFeature (
|
||||
**/
|
||||
EFI_STATUS
|
||||
PeiUsbClearEndpointHalt (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN PEI_USB_IO_PPI *UsbIoPpi,
|
||||
IN UINT8 EndpointAddress
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN PEI_USB_IO_PPI *UsbIoPpi,
|
||||
IN UINT8 EndpointAddress
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@@ -93,18 +91,18 @@ PeiUsbClearEndpointHalt (
|
||||
EFI_USB_ENDPOINT_DESCRIPTOR *EndpointDescriptor;
|
||||
UINT8 EndpointIndex;
|
||||
|
||||
|
||||
//
|
||||
// Check its interface
|
||||
//
|
||||
Status = UsbIoPpi->UsbGetInterfaceDescriptor (
|
||||
PeiServices,
|
||||
UsbIoPpi,
|
||||
&InterfaceDesc
|
||||
);
|
||||
PeiServices,
|
||||
UsbIoPpi,
|
||||
&InterfaceDesc
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
for (EndpointIndex = 0; EndpointIndex < InterfaceDesc->NumEndpoints; EndpointIndex++) {
|
||||
Status = UsbIoPpi->UsbGetEndpointDescriptor (PeiServices, UsbIoPpi, EndpointIndex, &EndpointDescriptor);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -121,14 +119,12 @@ PeiUsbClearEndpointHalt (
|
||||
}
|
||||
|
||||
Status = PeiUsbClearDeviceFeature (
|
||||
PeiServices,
|
||||
UsbIoPpi,
|
||||
EfiUsbEndpoint,
|
||||
EfiUsbEndpointHalt,
|
||||
EndpointAddress
|
||||
);
|
||||
PeiServices,
|
||||
UsbIoPpi,
|
||||
EfiUsbEndpoint,
|
||||
EfiUsbEndpointHalt,
|
||||
EndpointAddress
|
||||
);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user