summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c12
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h6
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h2
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h2
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c4
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h14
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c2
-rw-r--r--MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h6
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c14
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h6
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.h8
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c4
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h2
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c2
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.h6
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c2
-rw-r--r--MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.h6
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c182
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.h2
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c2
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.h4
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c24
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h6
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c6
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h14
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c11
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/keyboard.c8
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMass.h2
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c18
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h2
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c2
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.h2
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h2
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c6
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h4
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMouseDxe/usbmouse.c9
-rw-r--r--MdeModulePkg/Universal/PCD/Dxe/Service.h28
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/Service.h22
-rw-r--r--MdeModulePkg/Universal/RuntimeDxe/Runtime.c6
39 files changed, 223 insertions, 237 deletions
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
index 093388d45f..2e3edfd831 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
@@ -351,7 +351,7 @@ EhcGetRootHubPortStatus (
for (Index = 0; Index < MapSize; Index++) {
if (EHC_BIT_IS_SET (State, mUsbPortStateMap[Index].HwState)) {
- PortStatus->PortStatus |= mUsbPortStateMap[Index].UefiState;
+ PortStatus->PortStatus = (UINT16) (PortStatus->PortStatus | mUsbPortStateMap[Index].UefiState);
}
}
@@ -359,7 +359,7 @@ EhcGetRootHubPortStatus (
for (Index = 0; Index < MapSize; Index++) {
if (EHC_BIT_IS_SET (State, mUsbPortChangeMap[Index].HwState)) {
- PortStatus->PortChangeStatus |= mUsbPortChangeMap[Index].UefiState;
+ PortStatus->PortChangeStatus = (UINT16) (PortStatus->PortChangeStatus | mUsbPortChangeMap[Index].UefiState);
}
}
@@ -707,7 +707,7 @@ EhcControlTransfer (
// endpoint is bidirectional. EhcCreateUrb expects this
// combination of Ep addr and its direction.
//
- Endpoint = 0 | ((TransferDirection == EfiUsbDataIn) ? 0x80 : 0);
+ Endpoint = (UINT8) (0 | ((TransferDirection == EfiUsbDataIn) ? 0x80 : 0));
Urb = EhcCreateUrb (
Ehc,
DeviceAddress,
@@ -1340,7 +1340,7 @@ EhcDriverBindingSupported (
Status = gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- &PciIo,
+ (VOID **) &PciIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -1491,7 +1491,7 @@ EhcDriverBindingStart (
Status = gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- &PciIo,
+ (VOID **) &PciIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -1636,7 +1636,7 @@ EhcDriverBindingStop (
Status = gBS->OpenProtocol (
Controller,
&gEfiUsb2HcProtocolGuid,
- &Usb2Hc,
+ (VOID **) &Usb2Hc,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
index 57c0c00084..2b0e4c956c 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h
@@ -66,7 +66,7 @@ enum {
EHC_SYNC_POLL_TIME = 20 * EHC_STALL_1_MICROSECOND,
EHC_ASYNC_POLL_TIME = 50 * 10000UL, // The unit of time is 100us
- EHC_TPL = TPL_NOTIFY,
+ EHC_TPL = TPL_NOTIFY
};
//
@@ -95,7 +95,7 @@ enum {
#define EHC_FROM_THIS(a) CR(a, USB2_HC_DEV, Usb2Hc, USB2_HC_DEV_SIGNATURE)
-typedef struct _USB2_HC_DEV {
+struct _USB2_HC_DEV {
UINTN Signature;
EFI_USB2_HC_PROTOCOL Usb2Hc;
@@ -143,7 +143,7 @@ typedef struct _USB2_HC_DEV {
// Misc
//
EFI_UNICODE_STRING_TABLE *ControllerNameTable;
-} USB2_HC_DEV;
+};
extern EFI_DRIVER_BINDING_PROTOCOL gEhciDriverBinding;
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h
index be4bcd6556..247021b40d 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.h
@@ -30,7 +30,7 @@ enum {
EHC_DEBUG_QH = (UINTN)(1 << 8),
EHC_DEBUG_QTD = (UINTN)(1 << 9),
- EHC_DEBUG_BUF = (UINTN)(1 << 10),
+ EHC_DEBUG_BUF = (UINTN)(1 << 10)
};
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h
index 2ac27eb39c..929bd22a37 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciReg.h
@@ -93,7 +93,7 @@ enum {
//
EHC_PCI_CLASSC = 0x09,
EHC_PCI_CLASSC_PI = 0x20,
- EHC_BAR_INDEX = 0, /* how many bytes away from USB_BASE to 0x10 */
+ EHC_BAR_INDEX = 0 /* how many bytes away from USB_BASE to 0x10 */
};
#define EHC_LINK_TERMINATED(Link) (((Link) & 0x01) != 0)
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c
index 7b8b7b58f2..005e0596b6 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.c
@@ -486,7 +486,7 @@ EhcCreateQtds (
// Switch the Toggle bit if odd number of packets are included in the QTD.
//
if (((Qtd->DataLen + Ep->MaxPacket - 1) / Ep->MaxPacket) % 2) {
- Toggle = 1 - Toggle;
+ Toggle = (UINT8) (1 - Toggle);
}
Len += Qtd->DataLen;
@@ -588,7 +588,7 @@ EhcCreateUrb (
Ep = &Urb->Ep;
Ep->DevAddr = DevAddr;
- Ep->EpAddr = EpAddr & 0x0F;
+ Ep->EpAddr = (UINT8) (EpAddr & 0x0F);
Ep->Direction = ((EpAddr & 0x80) ? EfiUsbDataIn : EfiUsbDataOut);
Ep->DevSpeed = DevSpeed;
Ep->MaxPacket = MaxPacket;
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h
index a2a5826de8..a1dc8e6c0a 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciUrb.h
@@ -83,7 +83,7 @@ enum {
QH_MICROFRAME_6 = 0x40,
QH_MICROFRAME_7 = 0x80,
- USB_ERR_SHORT_PACKET = 0x200,
+ USB_ERR_SHORT_PACKET = 0x200
};
//
@@ -180,13 +180,13 @@ typedef struct _USB_ENDPOINT {
// Software QTD strcture, this is used to manage all the
// QTD generated from a URB. Don't add fields before QtdHw.
//
-typedef struct _EHC_QTD {
+struct _EHC_QTD {
QTD_HW QtdHw;
UINT32 Signature;
LIST_ENTRY QtdList; // The list of QTDs to one end point
UINT8 *Data; // Buffer of the original data
UINTN DataLen; // Original amount of data in this QTD
-} EHC_QTD;
+};
//
// Software QH structure. All three different transaction types
@@ -203,19 +203,19 @@ typedef struct _EHC_QTD {
// transfer is supported. A dummy QH is linked to EHCI AsyncListAddr
// as the reclamation header. New transfer is inserted after this QH.
//
-typedef struct _EHC_QH {
+struct _EHC_QH {
QH_HW QhHw;
UINT32 Signature;
EHC_QH *NextQh; // The queue head pointed to by horizontal link
LIST_ENTRY Qtds; // The list of QTDs to this queue head
UINTN Interval;
-} EHC_QH;
+};
//
// URB (Usb Request Block) contains information for all kinds of
// usb requests.
//
-typedef struct _URB {
+struct _URB {
UINT32 Signature;
LIST_ENTRY UrbList;
@@ -244,7 +244,7 @@ typedef struct _URB {
UINT32 Result;
UINTN Completed; // completed data length
UINT8 DataToggle;
-} URB;
+};
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c
index b7e7d66025..22556e7ef8 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.c
@@ -520,7 +520,7 @@ UsbHcFreeMem (
for (Count = 0; Count < (AllocSize / USBHC_MEM_UNIT); Count++) {
ASSERT (USB_HC_BIT_IS_SET (Block->Bits[Byte], Bit));
- Block->Bits[Byte] ^= (UINT8) USB_HC_BIT (Bit);
+ Block->Bits[Byte] = (UINT8) (Block->Bits[Byte] ^ USB_HC_BIT (Bit));
NEXT_BIT (Byte, Bit);
}
diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h
index 10d3545feb..09fd162529 100644
--- a/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h
+++ b/MdeModulePkg/Bus/Pci/EhciDxe/UsbHcMem.h
@@ -37,7 +37,7 @@ Revision History
typedef struct _USBHC_MEM_BLOCK USBHC_MEM_BLOCK;
-typedef struct _USBHC_MEM_BLOCK {
+struct _USBHC_MEM_BLOCK {
UINT8 *Bits; // Bit array to record which unit is allocated
UINTN BitsLen;
UINT8 *Buf;
@@ -45,7 +45,7 @@ typedef struct _USBHC_MEM_BLOCK {
UINTN BufLen; // Memory size in bytes
VOID *Mapping;
USBHC_MEM_BLOCK *Next;
-} USBHC_MEM_BLOCK;
+};
//
// USBHC_MEM_POOL is used to manage the memory used by USB
@@ -63,7 +63,7 @@ enum {
USBHC_MEM_UNIT = 64, // Memory allocation unit, must be 2^n, n>4
USBHC_MEM_UNIT_MASK = USBHC_MEM_UNIT - 1,
- USBHC_MEM_DEFAULT_PAGES = 16,
+ USBHC_MEM_DEFAULT_PAGES = 16
};
#define USBHC_MEM_ROUND(Len) (((Len) + USBHC_MEM_UNIT_MASK) & (~USBHC_MEM_UNIT_MASK))
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
index 1c3e37a7bc..8cda00fbda 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c
@@ -1538,7 +1538,7 @@ Uhci2ControlTransfer (
BOOLEAN IsSlow;
Uhc = UHC_FROM_USB2_HC_PROTO (This);
- IsSlow = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
+ IsSlow = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
return UhciControlTransfer (
&Uhc->UsbHc,
@@ -1668,7 +1668,7 @@ Uhci2AsyncInterruptTransfer (
BOOLEAN IsSlow;
Uhc = UHC_FROM_USB2_HC_PROTO (This);
- IsSlow = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
+ IsSlow = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
return UhciAsyncInterruptTransfer (
&Uhc->UsbHc,
@@ -1736,7 +1736,7 @@ Uhci2SyncInterruptTransfer (
}
Uhc = UHC_FROM_USB2_HC_PROTO (This);
- IsSlow = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
+ IsSlow = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
return UhciSyncInterruptTransfer (
&Uhc->UsbHc,
@@ -1897,7 +1897,7 @@ UhciDriverBindingSupported (
OpenStatus = gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- &PciIo,
+ (VOID **) &PciIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -2148,7 +2148,7 @@ UhciDriverBindingStart (
Status = gBS->OpenProtocol (
Controller,
&gEfiPciIoProtocolGuid,
- &PciIo,
+ (VOID **) &PciIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -2277,7 +2277,7 @@ UhciDriverBindingStop (
Status = gBS->OpenProtocol (
Controller,
&gEfiUsbHcProtocolGuid,
- &UsbHc,
+ (VOID **) &UsbHc,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
@@ -2294,7 +2294,7 @@ UhciDriverBindingStop (
Status = gBS->OpenProtocol (
Controller,
&gEfiUsb2HcProtocolGuid,
- &Usb2Hc,
+ (VOID **) &Usb2Hc,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
index c37894d3a8..5a810a3259 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h
@@ -75,7 +75,7 @@ enum {
//
UHCI_TPL = TPL_NOTIFY,
- USB_HC_DEV_SIGNATURE = EFI_SIGNATURE_32 ('u', 'h', 'c', 'i'),
+ USB_HC_DEV_SIGNATURE = EFI_SIGNATURE_32 ('u', 'h', 'c', 'i')
};
#pragma pack(1)
@@ -100,7 +100,7 @@ typedef struct {
// or bulk transfer can reclaim the unused bandwidth. Some USB
// device requires this bandwidth reclamation capability.
//
-typedef struct _USB_HC_DEV {
+struct _USB_HC_DEV {
UINT32 Signature;
EFI_USB_HC_PROTOCOL UsbHc;
EFI_USB2_HC_PROTOCOL Usb2Hc;
@@ -132,7 +132,7 @@ typedef struct _USB_HC_DEV {
USBHC_MEM_POOL *MemPool;
EFI_UNICODE_STRING_TABLE *CtrlNameTable;
VOID *FrameMapping;
-} USB_HC_DEV;
+};
extern EFI_DRIVER_BINDING_PROTOCOL gUhciDriverBinding;
extern EFI_COMPONENT_NAME_PROTOCOL gUhciComponentName;
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.h b/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.h
index 8b03ec6959..1b60ad7ff9 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciQueue.h
@@ -88,19 +88,19 @@ typedef struct {
typedef struct _UHCI_TD_SW UHCI_TD_SW;
typedef struct _UHCI_QH_SW UHCI_QH_SW;
-typedef struct _UHCI_QH_SW {
+struct _UHCI_QH_SW {
UHCI_QH_HW QhHw;
UHCI_QH_SW *NextQh;
UHCI_TD_SW *TDs;
UINTN Interval;
-} UHCI_QH_SW;
+};
-typedef struct _UHCI_TD_SW {
+struct _UHCI_TD_SW {
UHCI_TD_HW TdHw;
UHCI_TD_SW *NextTd;
UINT8 *Data;
UINT16 DataLen;
-} UHCI_TD_SW;
+};
/**
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c
index 63326292f3..8bb0f2b19a 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.c
@@ -116,7 +116,7 @@ UhciSetRegBit (
UINT16 Data;
Data = UhciReadReg (PciIo, Offset);
- Data |= Bit;
+ Data = (UINT16) (Data |Bit);
UhciWriteReg (PciIo, Offset, Data);
}
@@ -141,7 +141,7 @@ UhciClearRegBit (
UINT16 Data;
Data = UhciReadReg (PciIo, Offset);
- Data &= ~Bit;
+ Data = (UINT16) (Data & ~Bit);
UhciWriteReg (PciIo, Offset, Data);
}
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h
index 95a98dbab9..dd0103aadc 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciReg.h
@@ -98,7 +98,7 @@ enum {
USBTD_BABBLE = BIT(4), // Babble condition
USBTD_NAK = BIT(3), // NAK is received
USBTD_CRC = BIT(2), // CRC/Time out error
- USBTD_BITSTUFF = BIT(1), // Bit stuff error
+ USBTD_BITSTUFF = BIT(1) // Bit stuff error
};
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
index 222322a2b0..e1b602e7e2 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.c
@@ -498,7 +498,7 @@ UhciCheckTdStatus (
// next to the last known-good TD's data toggle if
// any TD is executed OK
//
- QhResult->NextToggle = 1 - (UINT8)TdHw->DataToggle;
+ QhResult->NextToggle = (UINT8) (1 - (UINT8)TdHw->DataToggle);
//
// This TD is finished OK or met short packet read. Update the
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.h b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.h
index cba65c661b..61e459b976 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciSched.h
@@ -38,7 +38,7 @@ enum {
USB_ERR_FAIL_MASK = EFI_USB_ERR_STALL | EFI_USB_ERR_BUFFER |
EFI_USB_ERR_BABBLE | EFI_USB_ERR_CRC |
EFI_USB_ERR_TIMEOUT | EFI_USB_ERR_BITSTUFF |
- EFI_USB_ERR_SYSTEM,
+ EFI_USB_ERR_SYSTEM
};
@@ -59,7 +59,7 @@ typedef struct _UHCI_ASYNC_REQUEST UHCI_ASYNC_REQUEST;
//
// Structure used to manager the asynchronous interrupt transfers.
//
-typedef struct _UHCI_ASYNC_REQUEST{
+struct _UHCI_ASYNC_REQUEST{
UINTN Signature;
LIST_ENTRY Link;
UHCI_ASYNC_REQUEST *Recycle;
@@ -86,7 +86,7 @@ typedef struct _UHCI_ASYNC_REQUEST{
//
EFI_ASYNC_USB_TRANSFER_CALLBACK Callback;
VOID *Context;
-} UHCI_ASYNC_REQUEST;
+};
#define UHCI_ASYNC_INT_FROM_LINK(a) \
CR (a, UHCI_ASYNC_REQUEST, Link, UHCI_ASYNC_INT_SIGNATURE)
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c b/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c
index 32082b15bf..7c598e2bbb 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.c
@@ -519,7 +519,7 @@ UsbHcFreeMem (
for (Count = 0; Count < (AllocSize / USBHC_MEM_UNIT); Count++) {
ASSERT (USB_HC_BIT_IS_SET (Block->Bits[Byte], Bit));
- Block->Bits[Byte] ^= (UINT8) USB_HC_BIT (Bit);
+ Block->Bits[Byte] = (UINT8) (Block->Bits[Byte] ^ USB_HC_BIT (Bit));
NEXT_BIT (Byte, Bit);
}
diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.h b/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.h
index df9ab0ec38..4df144be84 100644
--- a/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.h
+++ b/MdeModulePkg/Bus/Pci/UhciDxe/UsbHcMem.h
@@ -36,7 +36,7 @@ Revision History
typedef struct _USBHC_MEM_BLOCK USBHC_MEM_BLOCK;
-typedef struct _USBHC_MEM_BLOCK {
+struct _USBHC_MEM_BLOCK {
UINT8 *Bits; // Bit array to record which unit is allocated
UINTN BitsLen;
UINT8 *Buf;
@@ -44,7 +44,7 @@ typedef struct _USBHC_MEM_BLOCK {
UINTN BufLen; // Memory size in bytes
VOID *Mapping;
USBHC_MEM_BLOCK *Next;
-} USBHC_MEM_BLOCK;
+};
//
// USBHC_MEM_POOL is used to manage the memory used by USB
@@ -62,7 +62,7 @@ enum {
USBHC_MEM_UNIT = 64, // Memory allocation unit, must be 2^n, n>4
USBHC_MEM_UNIT_MASK = USBHC_MEM_UNIT - 1,
- USBHC_MEM_DEFAULT_PAGES = 16,
+ USBHC_MEM_DEFAULT_PAGES = 16
};
#define USBHC_MEM_ROUND(Len) (((Len) + USBHC_MEM_UNIT_MASK) & (~USBHC_MEM_UNIT_MASK))
diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
index 68f3683bb6..7633fd4912 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
+++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
@@ -1,20 +1,20 @@
/*++
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
scsibus.c
-
-Abstract:
-
+
+Abstract:
+
Revision History
--*/
@@ -96,9 +96,9 @@ NotifyFunction (
/**
The user Entry Point for module ScsiBus. The user code starts with this function.
- @param[in] ImageHandle The firmware allocated handle for the EFI image.
+ @param[in] ImageHandle The firmware allocated handle for the EFI image.
@param[in] SystemTable A pointer to the EFI System Table.
-
+
@retval EFI_SUCCESS The entry point is executed successfully.
@retval other Some error occurs when executing this entry point.
@@ -172,11 +172,11 @@ Returns:
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
-
+
if (Status == EFI_ALREADY_STARTED) {
return EFI_SUCCESS;
}
-
+
if (EFI_ERROR (Status)) {
Status = gBS->OpenProtocol (
Controller,
@@ -186,11 +186,11 @@ Returns:
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
);
-
+
if (Status == EFI_ALREADY_STARTED) {
return EFI_SUCCESS;
}
-
+
if (EFI_ERROR (Status)) {
return Status;
}
@@ -203,7 +203,7 @@ Returns:
);
return EFI_SUCCESS;
}
-
+
gBS->CloseProtocol (
Controller,
&gEfiExtScsiPassThruProtocolGuid,
@@ -268,7 +268,7 @@ Returns:
}
TargetId = &ScsiTargetId->ScsiId.ExtScsi[0];
-
+
Status = gBS->OpenProtocol (
Controller,
&gEfiDevicePathProtocolGuid,
@@ -312,7 +312,7 @@ Returns:
);
gBS->FreePool (ScsiBusDev);
return Status;
- }
+ }
DEBUG ((EFI_D_INFO, "Open Scsi Pass Thrugh Protocol\n"));
ScsiBusDev->ExtScsiSupport = FALSE;
} else {
@@ -363,7 +363,7 @@ Returns:
FromFirstTarget = TRUE;
} else {
if (ScsiBusDev->ExtScsiSupport) {
- ScsiBusDev->ExtScsiInterface->GetTargetLun (ScsiBusDev->ExtScsiInterface, RemainingDevicePath, &TargetId, &Lun);
+ ScsiBusDev->ExtScsiInterface->GetTargetLun (ScsiBusDev->ExtScsiInterface, RemainingDevicePath, &TargetId, &Lun);
} else {
ScsiBusDev->ScsiInterface->GetTargetLun (ScsiBusDev->ScsiInterface, RemainingDevicePath, &ScsiTargetId->ScsiId.Scsi, &Lun);
}
@@ -419,13 +419,13 @@ SCSIBusDriverBindingStop (
IN EFI_HANDLE *ChildHandleBuffer
)
/*++
-
+
Routine Description:
-
+
Arguments:
-
+
Returns:
-
+
--*/
// TODO: This - add argument and description to function comment
// TODO: Controller - add argument and description to function comment
@@ -456,7 +456,7 @@ SCSIBusDriverBindingStop (
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
);
-
+
if (EFI_ERROR (Status)) {
return EFI_DEVICE_ERROR;
}
@@ -471,7 +471,7 @@ SCSIBusDriverBindingStop (
&mScsiBusProtocolGuid,
&ScsiBusDev->BusIdentify
);
-
+
//
// Close the bus driver
//
@@ -553,7 +553,7 @@ SCSIBusDriverBindingStop (
gBS->OpenProtocol (
Controller,
&gEfiExtScsiPassThruProtocolGuid,
- &(EFI_EXT_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,
+ (VOID **) &(EFI_EXT_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,
This->DriverBindingHandle,
ChildHandleBuffer[Index],
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
@@ -562,7 +562,7 @@ SCSIBusDriverBindingStop (
gBS->OpenProtocol (
Controller,
&gEfiScsiPassThruProtocolGuid,
- &(EFI_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,
+ (VOID **) &(EFI_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,
This->DriverBindingHandle,
ChildHandleBuffer[Index],
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
@@ -590,11 +590,11 @@ ScsiGetDeviceType (
Routine Description:
Retrieves the device type information of the SCSI Controller.
-
+
Arguments:
This - Protocol instance pointer.
DeviceType - A pointer to the device type information
- retrieved from the SCSI Controller.
+ retrieved from the SCSI Controller.
Returns:
EFI_SUCCESS - Retrieves the device type information successfully.
@@ -622,12 +622,12 @@ ScsiGetDeviceLocation (
/*++
Routine Description:
Retrieves the device location in the SCSI channel.
-
+
Arguments:
This - Protocol instance pointer.
- Target - A pointer to the Target ID of a SCSI device
- on the SCSI channel.
- Lun - A pointer to the LUN of the SCSI device on
+ Target - A pointer to the Target ID of a SCSI device
+ on the SCSI channel.
+ Lun - A pointer to the LUN of the SCSI device on
the SCSI channel.
Returns:
@@ -659,7 +659,7 @@ ScsiResetBus (
Routine Description:
Resets the SCSI Bus that the SCSI Controller is attached to.
-
+
Arguments:
This - Protocol instance pointer.
@@ -668,7 +668,7 @@ ScsiResetBus (
EFI_DEVICE_ERROR - Errors encountered when resetting the SCSI bus.
EFI_UNSUPPORTED - The bus reset operation is not supported by the
SCSI Host Controller.
- EFI_TIMEOUT - A timeout occurred while attempting to reset
+ EFI_TIMEOUT - A timeout occurred while attempting to reset
the SCSI bus.
--*/
{
@@ -692,18 +692,18 @@ ScsiResetDevice (
Routine Description:
Resets the SCSI Controller that the device handle specifies.
-
+
Arguments:
This - Protocol instance pointer.
-
+
Returns:
EFI_SUCCESS - Reset the SCSI controller successfully.
EFI_DEVICE_ERROR - Errors are encountered when resetting the
SCSI Controller.
- EFI_UNSUPPORTED - The SCSI bus does not support a device
+ EFI_UNSUPPORTED - The SCSI bus does not support a device
reset operation.
- EFI_TIMEOUT - A timeout occurred while attempting to
+ EFI_TIMEOUT - A timeout occurred while attempting to
reset the SCSI Controller.
--*/
{
@@ -740,50 +740,50 @@ ScsiExecuteSCSICommand (
Routine Description:
Sends a SCSI Request Packet to the SCSI Controller for execution.
-
+
Arguments:
This - Protocol instance pointer.
- Packet - The SCSI request packet to send to the SCSI
+ Packet - The SCSI request packet to send to the SCSI
Controller specified by the device handle.
Event - If the SCSI bus where the SCSI device is attached
- does not support non-blocking I/O, then Event is
- ignored, and blocking I/O is performed.
+ does not support non-blocking I/O, then Event is
+ ignored, and blocking I/O is performed.
If Event is NULL, then blocking I/O is performed.
- If Event is not NULL and non-blocking I/O is
+ If Event is not NULL and non-blocking I/O is
supported, then non-blocking I/O is performed,
and Event will be signaled when the SCSI Request
Packet completes.
Returns:
- EFI_SUCCESS - The SCSI Request Packet was sent by the host
- successfully, and TransferLength bytes were
- transferred to/from DataBuffer.See
- HostAdapterStatus, TargetStatus,
+ EFI_SUCCESS - The SCSI Request Packet was sent by the host
+ successfully, and TransferLength bytes were
+ transferred to/from DataBuffer.See
+ HostAdapterStatus, TargetStatus,
SenseDataLength, and SenseData in that order
for additional status information.
- EFI_WARN_BUFFER_TOO_SMALL - The SCSI Request Packet was executed,
+ EFI_WARN_BUFFER_TOO_SMALL - The SCSI Request Packet was executed,
but the entire DataBuffer could not be transferred.
The actual number of bytes transferred is returned
- in TransferLength. See HostAdapterStatus,
- TargetStatus, SenseDataLength, and SenseData in
+ in TransferLength. See HostAdapterStatus,
+ TargetStatus, SenseDataLength, and SenseData in
that order for additional status information.
- EFI_NOT_READY - The SCSI Request Packet could not be sent because
- there are too many SCSI Command Packets already
+ EFI_NOT_READY - The SCSI Request Packet could not be sent because
+ there are too many SCSI Command Packets already
queued.The caller may retry again later.
- EFI_DEVICE_ERROR - A device error occurred while attempting to send
- the SCSI Request Packet. See HostAdapterStatus,
- TargetStatus, SenseDataLength, and SenseData in
+ EFI_DEVICE_ERROR - A device error occurred while attempting to send
+ the SCSI Request Packet. See HostAdapterStatus,
+ TargetStatus, SenseDataLength, and SenseData in
that order for additional status information.
- EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid.
- The SCSI Request Packet was not sent, so no
+ EFI_INVALID_PARAMETER - The contents of CommandPacket are invalid.
+ The SCSI Request Packet was not sent, so no
additional status information is available.
EFI_UNSUPPORTED - The command described by the SCSI Request Packet
- is not supported by the SCSI initiator(i.e., SCSI
+ is not supported by the SCSI initiator(i.e., SCSI
Host Controller). The SCSI Request Packet was not
- sent, so no additional status information is
+ sent, so no additional status information is
available.
- EFI_TIMEOUT - A timeout occurred while waiting for the SCSI
+ EFI_TIMEOUT - A timeout occurred while waiting for the SCSI
Request Packet to execute. See HostAdapterStatus,
- TargetStatus, SenseDataLength, and SenseData in
+ TargetStatus, SenseDataLength, and SenseData in
that order for additional status information.
--*/
{
@@ -792,17 +792,17 @@ ScsiExecuteSCSICommand (
UINT8 Target[TARGET_MAX_BYTES];
EFI_EVENT PacketEvent;
EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *ExtRequestPacket;
- SCSI_EVENT_DATA EventData;
+ SCSI_EVENT_DATA EventData;
PacketEvent = NULL;
-
+
if (Packet == NULL) {
return EFI_INVALID_PARAMETER;
}
ScsiIoDevice = SCSI_IO_DEV_FROM_THIS (This);
CopyMem (Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES);
-
+
if (ScsiIoDevice->ExtScsiSupport) {
ExtRequestPacket = (EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *) Packet;
Status = ScsiIoDevice->ExtScsiPassThru->PassThru (
@@ -825,11 +825,11 @@ ScsiExecuteSCSICommand (
}
//
- // Convert package into EFI1.0, EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET.
+ // Convert package into EFI1.0, EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET.
//
Status = ScsiioToPassThruPacket(Packet, (EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET*)WorkingBuffer);
if (EFI_ERROR(Status)) {
- gBS->FreePool(WorkingBuffer);
+ gBS->FreePool(WorkingBuffer);
return Status;
}
@@ -850,7 +850,7 @@ ScsiExecuteSCSICommand (
gBS->FreePool(WorkingBuffer);
return Status;
}
-
+
Status = ScsiIoDevice->ScsiPassThru->PassThru (
ScsiIoDevice->ScsiPassThru,
ScsiIoDevice->Pun.ScsiId.Scsi,
@@ -864,7 +864,7 @@ ScsiExecuteSCSICommand (
gBS->CloseEvent(PacketEvent);
return Status;
}
-
+
} else {
//
// If there's no event or SCSI Device doesn't support NON-BLOCKING, just convert
@@ -894,7 +894,7 @@ ScsiExecuteSCSICommand (
}
EFI_STATUS
-EFIAPI
+EFIAPI
ScsiScanCreateDevice (
EFI_DRIVER_BINDING_PROTOCOL *This,
EFI_HANDLE Controller,
@@ -991,7 +991,7 @@ Returns:
return Status;
}
}
-
+
ScsiIoDevice->DevicePath = AppendDevicePathNode (
ScsiBusDev->DevicePath,
ScsiDevicePath
@@ -1007,7 +1007,7 @@ Returns:
gBS->FreePool (ScsiIoDevice);
return EFI_OUT_OF_RESOURCES;
}
-
+
Status = gBS->InstallMultipleProtocolInterfaces (
&ScsiIoDevice->Handle,
&gEfiDevicePathProtocolGuid,
@@ -1044,7 +1044,7 @@ Returns:
}
BOOLEAN
-EFIAPI
+EFIAPI
DiscoverScsiDevice (
SCSI_IO_DEV *ScsiIoDevice
)
@@ -1061,7 +1061,7 @@ Arguments:
Returns:
TRUE - Find SCSI Device and verify it.
- FALSE - Unable to find SCSI Device.
+ FALSE - Unable to find SCSI Device.
--*/
{
@@ -1115,7 +1115,7 @@ Returns:
if (0x1e >= InquiryData.Peripheral_Type >= 0xa) {
return FALSE;
}
-
+
//
// valid device type and peripheral qualifier combination.
//
@@ -1145,14 +1145,14 @@ ScsiioToPassThruPacket (
Routine Description:
- Convert EFI_SCSI_IO_SCSI_REQUEST_PACKET packet to
+ Convert EFI_SCSI_IO_SCSI_REQUEST_PACKET packet to
EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET packet
-
+
Arguments:
Packet - The pointer of EFI_SCSI_IO_SCSI_REQUEST_PACKET
CommandPacket - The pointer of EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET
-
+
Returns:
NONE
@@ -1165,7 +1165,7 @@ Returns:
if (Packet->DataDirection == EFI_SCSI_IO_DATA_DIRECTION_BIDIRECTIONAL) {
return EFI_UNSUPPORTED;
}
-
+
ZeroMem (CommandPacket, sizeof (EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET));
CommandPacket->Timeout = Packet->Timeout;
@@ -1199,14 +1199,14 @@ PassThruToScsiioPacket (
Routine Description:
- Convert EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET packet to
+ Convert EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET packet to
EFI_SCSI_IO_SCSI_REQUEST_PACKET packet
-
+
Arguments:
ScsiPacket - The pointer of EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET
Packet - The pointer of EFI_SCSI_IO_SCSI_REQUEST_PACKET
-
+
Returns:
NONE
@@ -1229,7 +1229,7 @@ Returns:
Packet->OutDataBuffer = ScsiPacket->DataBuffer;
Packet->OutTransferLength = ScsiPacket->TransferLength;
}
-
+
return EFI_SUCCESS;
}
@@ -1246,24 +1246,24 @@ NotifyFunction (
Routine Description:
- Notify Function in which convert EFI1.0 PassThru Packet back to UEF2.0
+ Notify Function in which convert EFI1.0 PassThru Packet back to UEF2.0
SCSI IO Packet.
-
+
Arguments:
Event - The instance of EFI_EVENT.
Context - The parameter passed in.
-
+
Returns:
NONE
---*/
+--*/
{
EFI_SCSI_IO_SCSI_REQUEST_PACKET *Packet;
EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *ScsiPacket;
EFI_EVENT CallerEvent;
- SCSI_EVENT_DATA *PassData;
+ SCSI_EVENT_DATA *PassData;
PassData = (SCSI_EVENT_DATA*)Context;
Packet = (EFI_SCSI_IO_SCSI_REQUEST_PACKET *)PassData->Data1;
@@ -1273,7 +1273,7 @@ Returns:
// Convert EFI1.0 PassThru packet to UEFI2.0 SCSI IO Packet.
//
PassThruToScsiioPacket(ScsiPacket, Packet);
-
+
//
// After converting EFI1.0 PassThru Packet back to UEFI2.0 SCSI IO Packet,
// free WorkingBuffer.
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.h
index bdecfcf973..14f3c7feb0 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.h
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.h
@@ -26,7 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define _USB_DESCRIPTOR_H_
enum {
- USB_MAX_INTERFACE_SETTING = 8,
+ USB_MAX_INTERFACE_SETTING = 8
};
//
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
index 95ad8701af..9fbaf6b417 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
@@ -888,7 +888,7 @@ UsbEnumeratePort (
// If overcurrent condition is cleared, enable the port again
//
if (!USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_OVERCURRENT)) {
- HubApi->SetPortFeature (HubIf, Port, USB_HUB_PORT_POWER);
+ HubApi->SetPortFeature (HubIf, Port, (EFI_USB_PORT_FEATURE) USB_HUB_PORT_POWER);
}
} else if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_CONNECTION)) {
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.h
index e14b2d753c..3c22a0c447 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.h
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.h
@@ -100,7 +100,7 @@ EFI_STATUS
IN USB_INTERFACE *UsbIf
);
-typedef struct _USB_HUB_API{
+struct _USB_HUB_API{
USB_HUB_INIT Init;
USB_HUB_GET_PORT_STATUS GetPortStatus;
USB_HUB_CLEAR_PORT_CHANGE ClearPortChange;
@@ -108,7 +108,7 @@ typedef struct _USB_HUB_API{
USB_HUB_CLEAR_PORT_FEATURE ClearPortFeature;
USB_HUB_RESET_PORT ResetPort;
USB_HUB_RELEASE Release;
-} USB_HUB_API;
+};
USB_ENDPOINT_DESC*
UsbGetEndpointDesc (
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
index 25332f432f..cb54f03747 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c
@@ -98,7 +98,7 @@ UsbHubCtrlClearPortFeature (
USB_HUB_TARGET_PORT,
USB_HUB_REQ_CLEAR_FEATURE,
Feature,
- Port + 1,
+ (UINT16) (Port + 1),
NULL,
0
);
@@ -140,8 +140,8 @@ UsbHubCtrlClearTTBuffer (
//
// Check USB2.0 spec page 424 for wValue's encoding
//
- Value = (EpNum & 0x0F) | (DevAddr << 4) |
- ((EpType & 0x03) << 11) | ((EpNum & 0x80) << 15);
+ Value = (UINT16) ((EpNum & 0x0F) | (DevAddr << 4) |
+ ((EpType & 0x03) << 11) | ((EpNum & 0x80) << 15));
Status = UsbCtrlRequest (
HubDev,
@@ -150,7 +150,7 @@ UsbHubCtrlClearTTBuffer (
USB_HUB_TARGET_PORT,
USB_HUB_REQ_CLEAR_TT,
Value,
- Port + 1,
+ (UINT16) (Port + 1),
NULL,
0
);
@@ -265,7 +265,7 @@ UsbHubCtrlGetPortStatus (
USB_HUB_TARGET_PORT,
USB_HUB_REQ_GET_STATUS,
0,
- Port + 1,
+ (UINT16) (Port + 1),
State,
4
);
@@ -300,7 +300,7 @@ UsbHubCtrlResetTT (
USB_HUB_TARGET_HUB,
USB_HUB_REQ_RESET_TT,
0,
- Port + 1,
+ (UINT16) (Port + 1),
NULL,
0
);
@@ -376,7 +376,7 @@ UsbHubCtrlSetPortFeature (
USB_HUB_TARGET_PORT,
USB_HUB_REQ_SET_FEATURE,
Feature,
- Port + 1,
+ (UINT16) (Port + 1),
NULL,
0
);
@@ -744,7 +744,7 @@ UsbHubInit (
// for both gang/individual powered hubs.
//
for (Index = 0; Index < HubDesc.NumPorts; Index++) {
- UsbHubCtrlSetPortFeature (HubIf->Device, Index, USB_HUB_PORT_POWER);
+ UsbHubCtrlSetPortFeature (HubIf->Device, Index, (EFI_USB_PORT_FEATURE) USB_HUB_PORT_POWER);
}
gBS->Stall (HubDesc.PwrOn2PwrGood * 2 * USB_STALL_1_MS);
@@ -852,7 +852,7 @@ UsbHubSetPortFeature (
{
EFI_STATUS Status;
- Status = UsbHubCtrlSetPortFeature (HubIf->Device, Port, Feature);
+ Status = UsbHubCtrlSetPortFeature (HubIf->Device, Port, (UINT8) Feature);
return Status;
}
@@ -879,7 +879,7 @@ UsbHubClearPortFeature (
{
EFI_STATUS Status;
- Status = UsbHubCtrlClearPortFeature (HubIf->Device, Port, Feature);
+ Status = UsbHubCtrlClearPortFeature (HubIf->Device, Port, (UINT8) Feature);
return Status;
}
@@ -907,7 +907,7 @@ UsbHubResetPort (
UINTN Index;
EFI_STATUS Status;
- Status = UsbHubSetPortFeature (HubIf, Port, USB_HUB_PORT_RESET);
+ Status = UsbHubSetPortFeature (HubIf, Port, (EFI_USB_PORT_FEATURE) USB_HUB_PORT_RESET);
if (EFI_ERROR (Status)) {
return Status;
@@ -1121,7 +1121,7 @@ UsbRootHubClearPortChange (
Map = &mRootHubFeatureMap[Index];
if (USB_BIT_IS_SET (PortState.PortChangeStatus, Map->ChangedBit)) {
- UsbHcClearRootHubPortFeature (HubIf->Device->Bus, Port, Map->Feature);
+ UsbHcClearRootHubPortFeature (HubIf->Device->Bus, Port, (EFI_USB_PORT_FEATURE) Map->Feature);
}
}
}
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h
index 0238ea0184..a5bcbb2623 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h
@@ -25,6 +25,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef _USB_HUB_H_
#define _USB_HUB_H_
+#include <IndustryStandard/Usb.h>
+
#define USB_ENDPOINT_ADDR(EpAddr) ((EpAddr) & 0x7F)
#define USB_ENDPOINT_TYPE(Desc) ((Desc)->Attributes & USB_ENDPOINT_TYPE_MASK)
@@ -89,7 +91,7 @@ enum {
USB_HUB_SUBCLASS_CODE = 0x00,
- USB_HUB_LOOP = 50,
+ USB_HUB_LOOP = 50
};
#pragma pack(1)
@@ -110,7 +112,7 @@ typedef struct {
typedef struct {
UINT16 ChangedBit;
- EFI_USB_PORT_FEATURE Feature;
+ UINT8 Feature;
} USB_CHANGE_FEATURE_MAP;
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
index 216f948ff8..28d73daffe 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
@@ -518,7 +518,7 @@ UsbHcSyncInterruptTransfer (
UsbResult
);
} else {
- IsSlowDevice = (EFI_USB_SPEED_LOW == DevSpeed) ? TRUE : FALSE;
+ IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DevSpeed) ? TRUE : FALSE);
Status = UsbBus->UsbHc->SyncInterruptTransfer (
UsbBus->UsbHc,
DevAddr,
@@ -634,7 +634,7 @@ UsbOpenHostProtoByChild (
Status = gBS->OpenProtocol (
Bus->HostHandle,
&gEfiUsb2HcProtocolGuid,
- &Usb2Hc,
+ (VOID **) &Usb2Hc,
mUsbBusDriverBinding.DriverBindingHandle,
Child,
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
@@ -644,7 +644,7 @@ UsbOpenHostProtoByChild (
Status = gBS->OpenProtocol (
Bus->HostHandle,
&gEfiUsbHcProtocolGuid,
- &UsbHc,
+ (VOID **) &UsbHc,
mUsbBusDriverBinding.DriverBindingHandle,
Child,
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h
index 2ecc2c8e50..7407a36c19 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/usbbus.h
@@ -83,7 +83,7 @@ enum {
USB_BUS_TPL = TPL_NOTIFY,
USB_INTERFACE_SIGNATURE = EFI_SIGNATURE_32 ('U', 'S', 'B', 'I'),
- USB_BUS_SIGNATURE = EFI_SIGNATURE_32 ('U', 'S', 'B', 'B'),
+ USB_BUS_SIGNATURE = EFI_SIGNATURE_32 ('U', 'S', 'B', 'B')
};
#define USB_BIT(a) ((UINTN)(1 << (a)))
@@ -110,7 +110,7 @@ typedef struct _EFI_USB_BUS_PROTOCOL {
// Stands for the real USB device. Each device may
// has several seperately working interfaces.
//
-typedef struct _USB_DEVICE {
+struct _USB_DEVICE {
USB_BUS *Bus;
//
@@ -140,12 +140,12 @@ typedef struct _USB_DEVICE {
UINT8 ParentAddr;
USB_INTERFACE *ParentIf;
UINT8 ParentPort; // Start at 0
-} USB_DEVICE;
+};
//
// Stands for different functions of USB device
//
-typedef struct _USB_INTERFACE {
+struct _USB_INTERFACE {
UINTN Signature;
USB_DEVICE *Device;
USB_INTERFACE_DESC *IfDesc;
@@ -179,12 +179,12 @@ typedef struct _USB_INTERFACE {
// connected to EHCI.
//
UINT8 MaxSpeed;
-} USB_INTERFACE;
+};
//
// Stands for the current USB Bus
//
-typedef struct _USB_BUS {
+struct _USB_BUS {
UINTN Signature;
EFI_USB_BUS_PROTOCOL BusId;
@@ -201,7 +201,7 @@ typedef struct _USB_BUS {
// for root hub. Device with address i is at Devices[i].
//
USB_DEVICE *Devices[USB_MAX_DEVICES];
-} USB_BUS;
+};
extern EFI_USB_IO_PROTOCOL mUsbIoProtocol;
extern EFI_DRIVER_BINDING_PROTOCOL mUsbBusDriverBinding;
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c
index 3ea788cdad..a4a19e4b9c 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c
@@ -174,7 +174,7 @@ USBKeyboardDriverBindingSupported (
OpenStatus = gBS->OpenProtocol (
Controller,
&gEfiUsbIoProtocolGuid,
- &UsbIo,
+ (VOID **) &UsbIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -244,7 +244,7 @@ USBKeyboardDriverBindingStart (
Status = gBS->OpenProtocol (
Controller,
&gEfiUsbIoProtocolGuid,
- &UsbIo,
+ (VOID **) &UsbIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -500,12 +500,11 @@ USBKeyboardDriverBindingStop (
EFI_STATUS Status;
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *SimpleInput;
USB_KB_DEV *UsbKeyboardDevice;
- EFI_USB_IO_PROTOCOL *UsbIo;
Status = gBS->OpenProtocol (
Controller,
&gEfiSimpleTextInProtocolGuid,
- &SimpleInput,
+ (VOID **) &SimpleInput,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -526,7 +525,6 @@ USBKeyboardDriverBindingStop (
Controller
);
- UsbIo = UsbKeyboardDevice->UsbIo;
//
// Uninstall the Asyn Interrupt Transfer from this device
// will disable the key data input from this device
@@ -605,12 +603,9 @@ USBKeyboardReset (
{
EFI_STATUS Status;
USB_KB_DEV *UsbKeyboardDevice;
- EFI_USB_IO_PROTOCOL *UsbIo;
UsbKeyboardDevice = USB_KB_DEV_FROM_THIS (This);
- UsbIo = UsbKeyboardDevice->UsbIo;
-
KbdReportStatusCode (
UsbKeyboardDevice->DevicePath,
EFI_PROGRESS_CODE,
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/keyboard.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/keyboard.c
index 41286d6866..44914afb54 100644
--- a/MdeModulePkg/Bus/Usb/UsbKbDxe/keyboard.c
+++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/keyboard.c
@@ -206,9 +206,6 @@ InitUSBKeyboard (
UINT8 Duration;
EFI_STATUS Status;
UINT32 TransferResult;
- EFI_USB_IO_PROTOCOL *UsbIo;
-
- UsbIo = UsbKeyboardDevice->UsbIo;
KbdReportStatusCode (
UsbKeyboardDevice->DevicePath,
@@ -361,19 +358,16 @@ KeyboardHandler (
UINT8 Index;
UINT8 Index2;
BOOLEAN Down;
- EFI_STATUS Status;
BOOLEAN KeyRelease;
BOOLEAN KeyPress;
UINT8 SavedTail;
USB_KEY UsbKey;
UINT8 NewRepeatKey;
UINT32 UsbStatus;
- UINT8 *DataPtr;
ASSERT (Context);
NewRepeatKey = 0;
- DataPtr = (UINT8 *) Data;
UsbKeyboardDevice = (USB_KB_DEV *) Context;
UsbIo = UsbKeyboardDevice->UsbIo;
@@ -413,7 +407,7 @@ KeyboardHandler (
// Delete & Submit this interrupt again
//
- Status = UsbIo->UsbAsyncInterruptTransfer (
+ UsbIo->UsbAsyncInterruptTransfer (
UsbIo,
UsbKeyboardDevice->IntEndpointDescriptor.EndpointAddress,
FALSE,
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMass.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMass.h
index c48dee5a7b..8fcbed7884 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMass.h
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMass.h
@@ -84,7 +84,7 @@ enum {
USB_MASS_CMD_SUCCESS = 0,
USB_MASS_CMD_FAIL,
- USB_MASS_CMD_PERSISTENT,
+ USB_MASS_CMD_PERSISTENT
};
typedef
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
index 80fdf47055..e9b0a2a72a 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
@@ -89,7 +89,7 @@ UsbBootPutUint16 (
IN UINT16 Data16
)
{
- Data16 = USB_BOOT_SWAP16 (Data16);
+ Data16 = (UINT16) (USB_BOOT_SWAP16 (Data16));
CopyMem (Buf, &Data16, sizeof (UINT16));
}
@@ -125,7 +125,7 @@ UsbBootRequestSense (
ZeroMem (&SenseData, sizeof (USB_BOOT_REQUEST_SENSE_DATA));
SenseCmd.OpCode = USB_BOOT_REQUEST_SENSE_OPCODE;
- SenseCmd.Lun = USB_BOOT_LUN (UsbMass->Lun);
+ SenseCmd.Lun = (UINT8) (USB_BOOT_LUN (UsbMass->Lun));
SenseCmd.AllocLen = sizeof (USB_BOOT_REQUEST_SENSE_DATA);
Status = Transport->ExecCommand (
@@ -364,7 +364,7 @@ UsbBootIsUnitReady (
ZeroMem (&TestCmd, sizeof (USB_BOOT_TEST_UNIT_READY_CMD));
TestCmd.OpCode = USB_BOOT_TEST_UNIT_READY_OPCODE;
- TestCmd.Lun = USB_BOOT_LUN (UsbMass->Lun);
+ TestCmd.Lun = (UINT8) (USB_BOOT_LUN (UsbMass->Lun));
return UsbBootExecCmdWithRetry (
UsbMass,
@@ -407,7 +407,7 @@ UsbBootInquiry (
ZeroMem (&InquiryData, sizeof (USB_BOOT_INQUIRY_DATA));
InquiryCmd.OpCode = USB_BOOT_INQUIRY_OPCODE;
- InquiryCmd.Lun = USB_BOOT_LUN (UsbMass->Lun);
+ InquiryCmd.Lun = (UINT8) (USB_BOOT_LUN (UsbMass->Lun));
InquiryCmd.AllocLen = sizeof (InquiryData);
Status = UsbBootExecCmdWithRetry (
@@ -423,8 +423,8 @@ UsbBootInquiry (
return Status;
}
- UsbMass->Pdt = USB_BOOT_PDT (InquiryData.Pdt);
- Media->RemovableMedia = USB_BOOT_REMOVABLE (InquiryData.Removable);
+ UsbMass->Pdt = (UINT8) (USB_BOOT_PDT (InquiryData.Pdt));
+ Media->RemovableMedia = (BOOLEAN) (USB_BOOT_REMOVABLE (InquiryData.Removable));
//
// Default value 512 Bytes, in case no media present at first time
//
@@ -466,7 +466,7 @@ UsbBootReadCapacity (
ZeroMem (&CapacityData, sizeof (USB_BOOT_READ_CAPACITY_DATA));
CapacityCmd.OpCode = USB_BOOT_READ_CAPACITY_OPCODE;
- CapacityCmd.Lun = USB_BOOT_LUN (UsbMass->Lun);
+ CapacityCmd.Lun = (UINT8) (USB_BOOT_LUN (UsbMass->Lun));
Status = UsbBootExecCmdWithRetry (
UsbMass,
@@ -742,7 +742,7 @@ UsbBootReadBlocks (
ZeroMem (&ReadCmd, sizeof (USB_BOOT_READ10_CMD));
ReadCmd.OpCode = USB_BOOT_READ10_OPCODE;
- ReadCmd.Lun = USB_BOOT_LUN (UsbMass->Lun);
+ ReadCmd.Lun = (UINT8) (USB_BOOT_LUN (UsbMass->Lun));
UsbBootPutUint32 (ReadCmd.Lba, Lba);
UsbBootPutUint16 (ReadCmd.TransferLen, Count);
@@ -822,7 +822,7 @@ UsbBootWriteBlocks (
ZeroMem (&WriteCmd, sizeof (USB_BOOT_WRITE10_CMD));
WriteCmd.OpCode = USB_BOOT_WRITE10_OPCODE;
- WriteCmd.Lun = USB_BOOT_LUN (UsbMass->Lun);
+ WriteCmd.Lun = (UINT8) (USB_BOOT_LUN (UsbMass->Lun));
UsbBootPutUint32 (WriteCmd.Lba, Lba);
UsbBootPutUint16 (WriteCmd.TransferLen, Count);
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h
index cee70be412..dc4b43faae 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h
@@ -101,7 +101,7 @@ enum {
USB_PDT_DIRECT_ACCESS = 0x00, // Direct access device
USB_PDT_CDROM = 0x05, // CDROM
USB_PDT_OPTICAL = 0x07, // Non-CD optical disks
- USB_PDT_SIMPLE_DIRECT = 0x0E, // Simplified direct access device
+ USB_PDT_SIMPLE_DIRECT = 0x0E // Simplified direct access device
};
//
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c
index 0d6cca167b..939ba394cf 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c
@@ -182,7 +182,7 @@ UsbBotSendCommand (
Cbw.Signature = USB_BOT_CBW_SIGNATURE;
Cbw.Tag = UsbBot->CbwTag;
Cbw.DataLen = TransLen;
- Cbw.Flag = ((DataDir == EfiUsbDataIn) ? 0x80 : 0);
+ Cbw.Flag = (UINT8) ((DataDir == EfiUsbDataIn) ? 0x80 : 0);
Cbw.Lun = 0;
Cbw.CmdLen = CmdLen;
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.h
index e11e9c5108..8ccc48be23 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.h
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.h
@@ -60,7 +60,7 @@ enum {
//
USB_BOT_CBW_TIMEOUT = 1 * USB_MASS_STALL_1_S,
USB_BOT_CSW_TIMEOUT = 1 * USB_MASS_STALL_1_S,
- USB_BOT_RESET_TIMEOUT = 3 * USB_MASS_STALL_1_S,
+ USB_BOT_RESET_TIMEOUT = 3 * USB_MASS_STALL_1_S
};
//
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h
index d4a9f700ad..61954e6be9 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h
@@ -37,7 +37,7 @@ enum {
//
// Usb Cbi transfer timeout
//
- USB_CBI_RESET_TIMEOUT = 1 * USB_MASS_STALL_1_S,
+ USB_CBI_RESET_TIMEOUT = 1 * USB_MASS_STALL_1_S
};
//
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c
index a7c3e82f98..33c3755c97 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c
@@ -344,7 +344,7 @@ USBMassDriverBindingSupported (
Status = gBS->OpenProtocol (
Controller,
&gEfiUsbIoProtocolGuid,
- &UsbIo,
+ (VOID **) &UsbIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -421,7 +421,7 @@ USBMassDriverBindingStart (
Status = gBS->OpenProtocol (
Controller,
&gEfiUsbIoProtocolGuid,
- &UsbIo,
+ (VOID **) &UsbIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -547,7 +547,7 @@ USBMassDriverBindingStop (
Status = gBS->OpenProtocol (
Controller,
&gEfiBlockIoProtocolGuid,
- &BlockIo,
+ (VOID **) &BlockIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h
index 39bc87ca9e..140a990335 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h
@@ -33,10 +33,10 @@ typedef struct _USB_MASS_DEVICE USB_MASS_DEVICE;
#include "UsbMassBoot.h"
enum {
- USB_MASS_SIGNATURE= EFI_SIGNATURE_32 ('U', 's', 'b', 'K'),
+ USB_MASS_SIGNATURE= EFI_SIGNATURE_32 ('U', 's', 'b', 'K')
};
-typedef struct _USB_MASS_DEVICE {
+struct _USB_MASS_DEVICE {
UINT32 Signature;
EFI_HANDLE Controller;
EFI_USB_IO_PROTOCOL *UsbIo;
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/usbmouse.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/usbmouse.c
index a4c9e77660..01c37c19a6 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/usbmouse.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/usbmouse.c
@@ -208,7 +208,7 @@ USBMouseDriverBindingSupported (
OpenStatus = gBS->OpenProtocol (
Controller,
&gEfiUsbIoProtocolGuid,
- &UsbIo,
+ (VOID **) &UsbIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -279,7 +279,7 @@ USBMouseDriverBindingStart (
Status = gBS->OpenProtocol (
Controller,
&gEfiUsbIoProtocolGuid,
- &UsbIo,
+ (VOID **) &UsbIo,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_BY_DRIVER
@@ -513,7 +513,7 @@ USBMouseDriverBindingStop (
Status = gBS->OpenProtocol (
Controller,
&gEfiSimplePointerProtocolGuid,
- &SimplePointerProtocol,
+ (VOID **) &SimplePointerProtocol,
This->DriverBindingHandle,
Controller,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
@@ -944,12 +944,9 @@ UsbMouseReset (
)
{
USB_MOUSE_DEV *UsbMouseDevice;
- EFI_USB_IO_PROTOCOL *UsbIo;
UsbMouseDevice = USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL (This);
- UsbIo = UsbMouseDevice->UsbIo;
-
MouseReportStatusCode (
UsbMouseDevice->DevicePath,
EFI_PROGRESS_CODE,
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.h b/MdeModulePkg/Universal/PCD/Dxe/Service.h
index 7ff2b99724..3d6e3ed034 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Service.h
+++ b/MdeModulePkg/Universal/PCD/Dxe/Service.h
@@ -1,14 +1,14 @@
/** @file
Private functions used by PCD DXE driver.
-Copyright (c) 2006 - 2007, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006 - 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: Service.h
@@ -41,9 +41,9 @@ Module Name: Service.h
// PCD_DXE_DATABASE_GENTOOL_VERSION is defined in Autogen.h
// and generated by PCD Database generation tool.
//
-#if (PCD_SERVICE_DXE_DRIVER_VERSION != PCD_DXE_SERVICE_DRIVER_AUTOGEN_VERSION)
+//#if (PCD_SERVICE_DXE_DRIVER_VERSION != PCD_DXE_SERVICE_DRIVER_AUTOGEN_VERSION)
// #error "Please make sure the version of PCD Service DXE Driver and PCD DXE Database Generation Tool matches"
-#endif
+//#endif
//
// Protocol Interface function declaration.
@@ -395,7 +395,7 @@ ExGetWorker (
IN CONST EFI_GUID *Guid,
IN UINTN ExTokenNumber,
IN UINTN GetSize
- )
+ )
;
UINT32
@@ -403,7 +403,7 @@ GetSkuEnabledTokenNumber (
UINT32 LocalTokenNumber,
UINTN Size,
BOOLEAN IsPeiDb
- )
+ )
;
EFI_STATUS
@@ -445,7 +445,7 @@ BuildPcdDxeDataBase (
);
-UINTN
+UINTN
GetExPcdTokenNumber (
IN CONST EFI_GUID *Guid,
IN UINT32 ExTokenNumber
@@ -454,7 +454,7 @@ GetExPcdTokenNumber (
-EFI_STATUS
+EFI_STATUS
ExGetNextTokeNumber (
IN CONST EFI_GUID *Guid,
IN OUT UINTN *TokenNumber,
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.h b/MdeModulePkg/Universal/PCD/Pei/Service.h
index fcfdda30e3..eb7a45d30e 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Service.h
+++ b/MdeModulePkg/Universal/PCD/Pei/Service.h
@@ -1,14 +1,14 @@
/** @file
Private functions used by PCD PEIM.
-Copyright (c) 2006, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: Service.h
@@ -41,9 +41,9 @@ Module Name: Service.h
// PCD_PEI_DATABASE_GENTOOL_VERSION is defined in Autogen.h
// and generated by PCD Database generation tool.
//
-#if (PCD_SERVICE_PEIM_VERSION != PCD_PEI_SERVICE_DRIVER_AUTOGEN_VERSION )
+//#if (PCD_SERVICE_PEIM_VERSION != PCD_PEI_SERVICE_DRIVER_AUTOGEN_VERSION )
// #error "Please make sure the version of PCD Service PEIM and PCD PEI Database Generation Tool matches"
-#endif
+//#endif
//
// PPI Interface Implementation Declaration.
@@ -401,7 +401,7 @@ typedef struct {
} EX_PCD_ENTRY_ATTRIBUTE;
-UINTN
+UINTN
GetExPcdTokenNumber (
IN CONST EFI_GUID *Guid,
IN UINTN ExTokenNumber
diff --git a/MdeModulePkg/Universal/RuntimeDxe/Runtime.c b/MdeModulePkg/Universal/RuntimeDxe/Runtime.c
index c2c0242962..74d93f5c22 100644
--- a/MdeModulePkg/Universal/RuntimeDxe/Runtime.c
+++ b/MdeModulePkg/Universal/RuntimeDxe/Runtime.c
@@ -150,7 +150,6 @@ Returns:
--*/
{
UINTN Address;
- VOID *PlabelConvertAddress;
UINT64 VirtEndOfRange;
EFI_MEMORY_DESCRIPTOR *VirtEntry;
UINTN Index;
@@ -177,7 +176,6 @@ Returns:
return EFI_INVALID_PARAMETER;
}
- PlabelConvertAddress = NULL;
VirtEntry = mVirtualMap;
for (Index = 0; Index < mVirtualMapMaxIndex; Index++) {
//
@@ -368,9 +366,9 @@ Returns:
RuntimeDriverCalculateEfiHdrCrc (&gRT->Hdr);
//
- // BugBug: PI requires System Configuration Tables Conversion.
+ // BugBug: PI requires System Configuration Tables Conversion.
// Currently, we do not implement it.
- //
+ //
//
// Convert the runtime fields of the EFI System Table and recompute the CRC-32