summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-31 15:58:05 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-31 15:58:05 +0000
commit7538d53684792266c37e91f11a3ce2b7fb1e32d9 (patch)
tree1a82491c7ef95953283429136bde44ed621ed944 /MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
parent310580cf8a9656e3990b7d58fafdc0ce62b9b61f (diff)
downloadedk2-platforms-7538d53684792266c37e91f11a3ce2b7fb1e32d9.tar.xz
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/Xhci.c')
-rw-r--r--MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
index bbde0ca0b7..5ccb78e55b 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);
}
}