diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-26 06:54:08 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-26 06:54:08 +0000 |
commit | 617de480bcf916d37af6ed6f283091c6165fbc30 (patch) | |
tree | 4533efa8107cf8f7f1be3a964ae1a6e36e8e8f5e /EdkModulePkg/Bus/Usb | |
parent | d59f2c721ba3d73fa8a871f2c34504ae7e42cb1b (diff) | |
download | edk2-617de480bcf916d37af6ed6f283091c6165fbc30.zip edk2-617de480bcf916d37af6ed6f283091c6165fbc30.tar.gz edk2-617de480bcf916d37af6ed6f283091c6165fbc30.tar.bz2 |
Make MDE and EdkModule packages avoid all Intel IPF compiler warnings except waning 1419.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2326 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Bus/Usb')
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c | 3 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c | 26 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.h | 41 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbio.c | 7 | ||||
-rw-r--r-- | EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorageHelper.c | 27 |
5 files changed, 49 insertions, 55 deletions
diff --git a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c index 37b316f..fd830ec 100644 --- a/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c +++ b/EdkModulePkg/Bus/Usb/UsbBot/Dxe/bot.c @@ -441,8 +441,6 @@ BotDriverBindingStop ( EFI_USB_ATAPI_PROTOCOL *BotAtapiProtocol;
USB_BOT_DEVICE *UsbBotDev;
- EFI_USB_IO_PROTOCOL *UsbIo;
-
//
// Get our context back.
//
@@ -464,7 +462,6 @@ BotDriverBindingStop ( // After installing Usb-Atapi protocol onto this handle
// it will be called by upper layer drivers such as Fat
//
- UsbIo = UsbBotDev->UsbIo;
BotReportStatusCode (
UsbBotDev->DevicePath,
diff --git a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c index 029d9cb..ffca535 100644 --- a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c +++ b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.c @@ -84,14 +84,6 @@ ReportUsbStatusCode ( IN EFI_STATUS_CODE_VALUE Code
);
-//
-// Supported function
-//
-VOID
-InitializeUsbIoInstance (
- IN USB_IO_CONTROLLER_DEVICE *UsbIoController
- );
-
STATIC
USB_IO_CONTROLLER_DEVICE *
CreateUsbIoControllerDevice (
@@ -213,7 +205,7 @@ UsbAllocateAddress ( //
// Found one, covert to address, and mark it use
//
- AddressPool[ByteIndex] |= (1 << BitIndex);
+ AddressPool[ByteIndex] = (UINT8) (AddressPool[ByteIndex] | (1 << BitIndex));
return (UINT8) (ByteIndex * 8 + BitIndex);
}
}
@@ -251,7 +243,7 @@ UsbFreeAddress ( WhichByte = (UINT8) (DevAddress / 8);
WhichBit = (UINT8) (DevAddress & 0x7);
- AddressPool[WhichByte] &= (~(1 << WhichBit));
+ AddressPool[WhichByte] = (UINT8) (AddressPool[WhichByte] & (~(1 << WhichBit)));
}
EFI_STATUS
@@ -2277,7 +2269,7 @@ ParentPortReset ( ResetRootPort (ParentIoDev->BusController, HubPort, RetryTimes);
} else {
DEBUG ((gUSBDebugLevel, "Reset from Hub, Addr 0x%x\n", ParentIoDev->DeviceAddress));
- ResetHubPort (ParentController, HubPort + 1);
+ ResetHubPort (ParentController, (UINT8) (HubPort + 1));
}
//
// If we only need port reset, just return
@@ -2580,16 +2572,13 @@ IsDeviceDisconnected ( --*/
{
USB_IO_DEVICE *ParentIoDev;
- USB_IO_DEVICE *UsbIoDev;
USB_IO_CONTROLLER_DEVICE *ParentController;
UINT8 HubPort;
EFI_STATUS Status;
- EFI_USB_IO_PROTOCOL *UsbIo;
EFI_USB_PORT_STATUS PortStatus;
ParentController = UsbIoController->Parent;
ParentIoDev = ParentController->UsbDevice;
- UsbIoDev = UsbIoController->UsbDevice;
HubPort = UsbIoController->ParentPort;
if (ParentIoDev->DeviceAddress == 1) {
@@ -2603,10 +2592,9 @@ IsDeviceDisconnected ( );
} else {
- UsbIo = &UsbIoController->UsbIo;
Status = HubGetPortStatus (
&ParentController->UsbIo,
- HubPort + 1,
+ (UINT8) (HubPort + 1),
(UINT32 *) &PortStatus
);
@@ -3308,7 +3296,7 @@ UsbVirtualHcControlTransfer ( TransferResult
);
} else {
- IsSlowDevice = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
+ IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
Status = UsbBusDev->UsbHCInterface->ControlTransfer (
UsbBusDev->UsbHCInterface,
DeviceAddress,
@@ -3530,7 +3518,7 @@ UsbVirtualHcAsyncInterruptTransfer ( Context
);
} else {
- IsSlowDevice = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
+ IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
Status = UsbBusDev->UsbHCInterface->AsyncInterruptTransfer (
UsbBusDev->UsbHCInterface,
DeviceAddress,
@@ -3639,7 +3627,7 @@ UsbVirtualHcSyncInterruptTransfer ( TransferResult
);
} else {
- IsSlowDevice = (EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE;
+ IsSlowDevice = (BOOLEAN) ((EFI_USB_SPEED_LOW == DeviceSpeed) ? TRUE : FALSE);
Status = UsbBusDev->UsbHCInterface->SyncInterruptTransfer (
UsbBusDev->UsbHCInterface,
DeviceAddress,
diff --git a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.h b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.h index a5d4c24..4977d71 100644 --- a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.h +++ b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbbus.h @@ -1111,4 +1111,45 @@ UsbVirtualHcAsyncIsochronousTransfer ( --*/
;
+EFI_STATUS
+EFIAPI
+UsbPortReset (
+ IN EFI_USB_IO_PROTOCOL *This
+ )
+/*++
+
+ Routine Description:
+ Resets and reconfigures the USB controller. This function will
+ work for all USB devices except USB Hub Controllers.
+
+ Arguments:
+ This - Indicates the calling context.
+
+ Returns:
+ EFI_SUCCESS
+ EFI_INVALID_PARAMETER
+ EFI_DEVICE_ERROR
+
+--*/
+;
+
+VOID
+InitializeUsbIoInstance (
+ IN USB_IO_CONTROLLER_DEVICE *UsbIoController
+ )
+/*++
+
+Routine Description:
+
+ Initialize the instance of UsbIo controller
+
+Arguments:
+
+ UsbIoController - A pointer to controller structure of UsbIo
+
+Returns:
+
+--*/
+;
+
#endif
diff --git a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbio.c b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbio.c index afd2e46..4601767 100644 --- a/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbio.c +++ b/EdkModulePkg/Bus/Usb/UsbBus/Dxe/usbio.c @@ -99,13 +99,6 @@ UsbAsyncIsochronousTransfer ( IN VOID *Context OPTIONAL
);
-extern
-EFI_STATUS
-EFIAPI
-UsbPortReset (
- IN EFI_USB_IO_PROTOCOL *This
- );
-
STATIC
EFI_STATUS
EFIAPI
diff --git a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorageHelper.c b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorageHelper.c index c81fbf2..c011349 100644 --- a/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorageHelper.c +++ b/EdkModulePkg/Bus/Usb/UsbMassStorage/Dxe/UsbMassStorageHelper.c @@ -234,9 +234,7 @@ USBFloppyInquiry ( {
ATAPI_PACKET_COMMAND Packet;
EFI_STATUS Status;
- EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
- UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
//
// prepare command packet for the Inquiry Packet Command.
@@ -309,10 +307,8 @@ USBFloppyRead10 ( VOID *ptrBuffer;
EFI_STATUS Status;
UINT16 TimeOut;
- EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UINT8 Index;
- UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
//
// prepare command packet for the Inquiry Packet Command.
@@ -387,6 +383,7 @@ USBFloppyRead10 ( return Status;
}
+STATIC
EFI_STATUS
USBFloppyReadCapacity (
IN USB_FLOPPY_DEV *UsbFloppyDevice
@@ -410,7 +407,6 @@ USBFloppyReadCapacity ( //
EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet;
- EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
//
// used for capacity data returned from Usb Floppy
@@ -419,7 +415,6 @@ USBFloppyReadCapacity ( ZeroMem (&Data, sizeof (Data));
- UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
ZeroMem (&Packet, sizeof (ATAPI_PACKET_COMMAND));
Packet.Inquiry.opcode = READ_CAPACITY;
@@ -473,7 +468,6 @@ USBFloppyReadFormatCapacity ( //
EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet;
- EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
//
// used for capacity data returned from Usb Floppy
@@ -482,7 +476,6 @@ USBFloppyReadFormatCapacity ( ZeroMem (&FormatData, sizeof (FormatData));
- UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
ZeroMem (&Packet, sizeof (ATAPI_PACKET_COMMAND));
Packet.ReadFormatCapacity.opcode = READ_FORMAT_CAPACITY;
@@ -556,9 +549,7 @@ UsbFloppyRequestSense ( UINT8 *Ptr;
BOOLEAN SenseReq;
ATAPI_PACKET_COMMAND Packet;
- EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
- UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
*SenseCounts = 0;
@@ -672,11 +663,9 @@ UsbFloppyTestUnitReady ( {
ATAPI_PACKET_COMMAND Packet;
EFI_STATUS Status;
- EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UINT32 RetryIndex;
UINT32 MaximumRetryTimes;
- UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
MaximumRetryTimes = 2;
//
// fill command packet
@@ -748,10 +737,8 @@ USBFloppyWrite10 ( VOID *ptrBuffer;
EFI_STATUS Status;
UINT16 TimeOut;
- EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UINT8 Index;
- UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
//
// prepare command packet for the Write10 Packet Command.
@@ -863,8 +850,6 @@ UsbFloppyDetectMedia ( // a flag used to determine whether need to perform Read Capacity command.
//
- REQUEST_SENSE_DATA *SensePtr;
-
//
// init
//
@@ -884,8 +869,6 @@ UsbFloppyDetectMedia ( if (!EFI_ERROR (Status)) {
- SensePtr = UsbFloppyDevice->SenseData;
-
//
// No Media
//
@@ -1124,7 +1107,6 @@ UsbFloppyModeSense5APage5 ( //
EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet;
- EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UFI_MODE_PARAMETER_PAGE_5 ModePage5;
EFI_LBA LastBlock;
UINT32 SectorsPerTrack;
@@ -1132,7 +1114,6 @@ UsbFloppyModeSense5APage5 ( UINT32 NumberOfHeads;
UINT32 DataBytesPerSector;
- UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
ZeroMem (&ModePage5, sizeof (UFI_MODE_PARAMETER_PAGE_5));
@@ -1210,10 +1191,8 @@ UsbFloppyModeSense5APage1C ( //
EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet;
- EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UFI_MODE_PARAMETER_PAGE_1C ModePage1C;
- UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
ZeroMem (&ModePage1C, sizeof (UFI_MODE_PARAMETER_PAGE_1C));
@@ -1285,11 +1264,9 @@ UsbFloppyModeSense5APage3F ( //
EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet;
- EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
UFI_MODE_PARAMETER_HEADER Header;
UINT32 Size;
- UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
Size = sizeof (UFI_MODE_PARAMETER_HEADER);
@@ -1343,11 +1320,9 @@ UsbSCSIModeSense1APage3F ( //
EFI_STATUS Status;
ATAPI_PACKET_COMMAND Packet;
- EFI_USB_ATAPI_PROTOCOL *UsbAtapiInterface;
SCSI_MODE_PARAMETER_HEADER6 Header;
UINT32 Size;
- UsbAtapiInterface = UsbFloppyDevice->AtapiProtocol;
Size = sizeof (SCSI_MODE_PARAMETER_HEADER6);
|