mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 04:13:35 +00:00
[USBEHCI]
- Fix a type-limits warning - Remove unnecessary casts and asserts - Use NULL for pointer comparison - Fix IN vs OUT annotation svn path=/trunk/; revision=63687
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
IN struct _EHCI_USBCMD_CONTENT *UsbCmd) PURE; \
|
||||
\
|
||||
STDMETHOD_(VOID, GetCommandRegister)( THIS_ \
|
||||
IN struct _EHCI_USBCMD_CONTENT *UsbCmd) PURE;
|
||||
OUT struct _EHCI_USBCMD_CONTENT *UsbCmd) PURE;
|
||||
|
||||
#define IMP_IUSBEHCIHARDWARE \
|
||||
STDMETHODIMP_(VOID) SetAsyncListRegister( \
|
||||
@@ -39,7 +39,7 @@
|
||||
STDMETHODIMP_(VOID) SetCommandRegister( \
|
||||
IN struct _EHCI_USBCMD_CONTENT *UsbCmd); \
|
||||
STDMETHODIMP_(VOID) GetCommandRegister( \
|
||||
IN struct _EHCI_USBCMD_CONTENT *UsbCmd);
|
||||
OUT struct _EHCI_USBCMD_CONTENT *UsbCmd);
|
||||
|
||||
DECLARE_INTERFACE_(IEHCIHardwareDevice, IUSBHardwareDevice)
|
||||
{
|
||||
|
||||
@@ -376,6 +376,7 @@ CUSBQueue::GetIntervalIndex(
|
||||
{
|
||||
UCHAR IntervalIndex;
|
||||
|
||||
ASSERT(Interval != 0);
|
||||
if (Interval == 1)
|
||||
IntervalIndex = 1;
|
||||
else if (Interval == 2)
|
||||
@@ -392,11 +393,10 @@ CUSBQueue::GetIntervalIndex(
|
||||
IntervalIndex = 7;
|
||||
else if (Interval <= 128)
|
||||
IntervalIndex = 8;
|
||||
else if (Interval <= 256)
|
||||
IntervalIndex = 9;
|
||||
else
|
||||
IntervalIndex = 10;
|
||||
IntervalIndex = 9;
|
||||
|
||||
ASSERT(IntervalIndex < EHCI_INTERRUPT_ENTRIES_COUNT);
|
||||
return IntervalIndex;
|
||||
}
|
||||
|
||||
@@ -746,8 +746,7 @@ CUSBQueue::ProcessPeriodicSchedule(
|
||||
//
|
||||
// get queue head structure
|
||||
//
|
||||
QueueHead = (PQUEUE_HEAD)CONTAINING_RECORD(Entry, QUEUE_HEAD, LinkedQueueHeads);
|
||||
ASSERT(QueueHead);
|
||||
QueueHead = CONTAINING_RECORD(Entry, QUEUE_HEAD, LinkedQueueHeads);
|
||||
|
||||
//
|
||||
// sanity check
|
||||
@@ -822,8 +821,7 @@ CUSBQueue::ProcessAsyncList(
|
||||
//
|
||||
// get queue head structure
|
||||
//
|
||||
QueueHead = (PQUEUE_HEAD)CONTAINING_RECORD(Entry, QUEUE_HEAD, LinkedQueueHeads);
|
||||
ASSERT(QueueHead);
|
||||
QueueHead = CONTAINING_RECORD(Entry, QUEUE_HEAD, LinkedQueueHeads);
|
||||
|
||||
//
|
||||
// sanity check
|
||||
|
||||
@@ -894,7 +894,7 @@ CUSBRequest::BuildControlTransferQueueHead(
|
||||
//
|
||||
QueueHead->EndPointCharacteristics.DeviceAddress = GetDeviceAddress();
|
||||
|
||||
ASSERT(m_EndpointDescriptor == FALSE);
|
||||
ASSERT(m_EndpointDescriptor == NULL);
|
||||
|
||||
//
|
||||
// init setup descriptor
|
||||
|
||||
Reference in New Issue
Block a user