diff options
author | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-31 15:58:05 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-10-31 15:58:05 +0000 |
commit | 7538d53684792266c37e91f11a3ce2b7fb1e32d9 (patch) | |
tree | 1a82491c7ef95953283429136bde44ed621ed944 /MdeModulePkg/Bus/Pci/XhciDxe | |
parent | 310580cf8a9656e3990b7d58fafdc0ce62b9b61f (diff) | |
download | edk2-7538d53684792266c37e91f11a3ce2b7fb1e32d9.zip edk2-7538d53684792266c37e91f11a3ce2b7fb1e32d9.tar.gz edk2-7538d53684792266c37e91f11a3ce2b7fb1e32d9.tar.bz2 |
MdeModulePkg: Remove variables that are set, but not used
GCC 4.6 generates a warning when a variable is set,
but never used.
Signed-off-by: jljusten
Reviewed-by: lgao4
Reviewed-by: erictian
Reviewed-by: rsun3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12617 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Pci/XhciDxe')
-rw-r--r-- | MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 10 | ||||
-rw-r--r-- | MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 5 |
2 files changed, 6 insertions, 9 deletions
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c index bbde0ca..5ccb78e 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c @@ -973,16 +973,16 @@ XhcControlTransfer ( //
// For super speed hub, its bit10~12 presents the attached device speed.
//
- if ((*(UINT32 *)Data & XHC_PORTSC_PS) >> 10 == 0) {
+ if ((State & XHC_PORTSC_PS) >> 10 == 0) {
PortStatus.PortStatus |= USB_PORT_STAT_SUPER_SPEED;
}
} else if (DeviceSpeed == EFI_USB_SPEED_HIGH) {
//
// For high speed hub, its bit9~10 presents the attached device speed.
//
- if (XHC_BIT_IS_SET (*(UINT32 *)Data, BIT9)) {
+ if (XHC_BIT_IS_SET (State, BIT9)) {
PortStatus.PortStatus |= USB_PORT_STAT_LOW_SPEED;
- } else if (XHC_BIT_IS_SET (*(UINT32 *)Data, BIT10)) {
+ } else if (XHC_BIT_IS_SET (State, BIT10)) {
PortStatus.PortStatus |= USB_PORT_STAT_HIGH_SPEED;
}
} else {
@@ -994,14 +994,14 @@ XhcControlTransfer ( //
MapSize = sizeof (mUsbPortStateMap) / sizeof (USB_PORT_STATE_MAP);
for (Index = 0; Index < MapSize; Index++) {
- if (XHC_BIT_IS_SET (*(UINT32 *)Data, mUsbPortStateMap[Index].HwState)) {
+ if (XHC_BIT_IS_SET (State, mUsbPortStateMap[Index].HwState)) {
PortStatus.PortStatus = (UINT16) (PortStatus.PortStatus | mUsbPortStateMap[Index].UefiState);
}
}
MapSize = sizeof (mUsbPortChangeMap) / sizeof (USB_PORT_STATE_MAP);
for (Index = 0; Index < MapSize; Index++) {
- if (XHC_BIT_IS_SET (*(UINT32 *)Data, mUsbPortChangeMap[Index].HwState)) {
+ if (XHC_BIT_IS_SET (State, mUsbPortChangeMap[Index].HwState)) {
PortStatus.PortChangeStatus = (UINT16) (PortStatus.PortChangeStatus | mUsbPortChangeMap[Index].UefiState);
}
}
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c index 6745d2f..49cc261 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c @@ -181,6 +181,7 @@ XhcCreateUrb ( Urb->Context = Context;
Status = XhcCreateTransferTrb (Xhc, Urb);
+ ASSERT_EFI_ERROR (Status);
return Urb;
}
@@ -740,13 +741,11 @@ XhcFreeEventRing ( EVENT_RING_SEG_TABLE_ENTRY *TablePtr;
VOID *RingBuf;
EVENT_RING_SEG_TABLE_ENTRY *EventRingPtr;
- UINTN InterrupterTarget;
if(EventRing->EventRingSeg0 == NULL) {
return EFI_SUCCESS;
}
- InterrupterTarget = EventRing->EventInterrupter;
//
// Get the Event Ring Segment Table base address
//
@@ -1048,12 +1047,10 @@ XhciDelAsyncIntTransfer ( LIST_ENTRY *Next;
URB *Urb;
EFI_USB_DATA_DIRECTION Direction;
- BOOLEAN Found;
Direction = ((EpNum & 0x80) != 0) ? EfiUsbDataIn : EfiUsbDataOut;
EpNum &= 0x0F;
- Found = FALSE;
Urb = NULL;
EFI_LIST_FOR_EACH_SAFE (Entry, Next, &Xhc->AsyncIntTransfers) {
|