Author: janderwald
Date: Thu Jun 4 13:37:57 2009
New Revision: 41280
URL:
http://svn.reactos.org/svn/reactos?rev=41280&view=rev
Log:
- Remove a few bad (PLIST_ENTRY) casts
Modified:
trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/etd.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/ohci.c
trunk/reactos/drivers/usb/nt4compat/usbdriver/uhci.c
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/ehci.c [iso-8859-1] Thu Jun 4 13:37:57
2009
@@ -630,7 +630,7 @@
if (can_submit == STATUS_NO_MORE_ENTRIES)
{
//no enough bandwidth or tds
- InsertHeadList(&pendp->urb_list, (PLIST_ENTRY) purb);
+ InsertHeadList(&pendp->urb_list, &purb->urb_link);
InsertTailList(&temp_list, pthis);
}
else
@@ -788,7 +788,7 @@
}
pending_endp->pendp = purb->pendp;
- InsertTailList(&ehci->pending_endp_list, (PLIST_ENTRY) pending_endp);
+ InsertTailList(&ehci->pending_endp_list, &pending_endp->endp_link);
unlock_dev(pdev, TRUE);
unlock_pending_endp_list(&ehci->pending_endp_list_lock);
@@ -1198,7 +1198,7 @@
purb->flags &= ~URB_FLAG_STATE_MASK;
purb->flags |= URB_FLAG_STATE_PENDING;
- InsertHeadList(&pendp->urb_list, (PLIST_ENTRY) purb);
+ InsertHeadList(&pendp->urb_list, &purb->urb_link);
}
pending_endp = alloc_pending_endp(&ehci->pending_endp_pool, 1);
@@ -1382,7 +1382,7 @@
purb->flags &= ~URB_FLAG_STATE_MASK;
purb->flags |= URB_FLAG_STATE_IN_PROCESS | URB_FLAG_IN_SCHEDULE;
- InsertTailList(&ehci->urb_list, (PLIST_ENTRY) purb);
+ InsertTailList(&ehci->urb_list, &purb->urb_link);
return TRUE;
}
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/etd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/etd.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/etd.c [iso-8859-1] Thu Jun 4 13:37:57
2009
@@ -451,7 +451,7 @@
lh = elem_link->list_link->get_list_head(elem_link->list_link);
if (lh == NULL)
return;
- InsertHeadList(lh, (PLIST_ENTRY) elem_link);
+ InsertHeadList(lh, &elem_link->elem_link);
ref = elem_link->list_link->release_ref(elem_link->list_link);
pool->free_count++;
if (ref == 0)
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.c [iso-8859-1] Thu Jun 4 13:37:57
2009
@@ -122,7 +122,7 @@
}
RtlZeroMemory(pevent, sizeof(USB_EVENT));
- InsertTailList(&pool->free_que, (PLIST_ENTRY) pevent);
+ InsertTailList(&pool->free_que, &pevent->event_link);
pool->free_count++;
usb_dbg_print(DBGLVL_MAXIMUM + 1,
("free_event(): alloced=0x%x, addr=0x%x\n", MAX_EVENTS -
pool->free_count, pevent));
@@ -204,7 +204,7 @@
return FALSE;
RtlZeroMemory(ptimer, sizeof(TIMER_SVC));
- InsertTailList(&pool->free_que, (PLIST_ENTRY) &
ptimer->timer_svc_link);
+ InsertTailList(&pool->free_que, &ptimer->timer_svc_link);
pool->free_count++;
return TRUE;
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/ohci.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/ohci.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/ohci.c [iso-8859-1] Thu Jun 4 13:37:57
2009
@@ -927,7 +927,7 @@
if (can_submit == STATUS_NO_MORE_ENTRIES)
{
//no enough bandwidth or tds
- InsertHeadList(&pendp->urb_list, (PLIST_ENTRY) purb);
+ InsertHeadList(&pendp->urb_list, &purb->urb_link);
InsertTailList(&temp_list, pthis);
}
else
@@ -1332,7 +1332,7 @@
}
pending_endp->pendp = purb->pendp;
- InsertTailList(&ehci->pending_endp_list, (PLIST_ENTRY) pending_endp);
+ InsertTailList(&ehci->pending_endp_list, &pending_endp->endp_link);
unlock_dev(pdev, TRUE);
unlock_pending_endp_list(&ehci->pending_endp_list_lock);
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/uhci.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/uhci.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/uhci.c [iso-8859-1] Thu Jun 4 13:37:57
2009
@@ -180,7 +180,7 @@
}
RtlZeroMemory(pending_endp, sizeof(UHCI_PENDING_ENDP));
- InsertTailList(&pool->free_que, (PLIST_ENTRY) &
pending_endp->endp_link);
+ InsertTailList(&pool->free_que, &pending_endp->endp_link);
pool->free_count++;
return TRUE;
@@ -1273,7 +1273,7 @@
if (can_submit == STATUS_NO_MORE_ENTRIES)
{
//no enough bandwidth or tds
- InsertHeadList(&pendp->urb_list, (PLIST_ENTRY) purb);
+ InsertHeadList(&pendp->urb_list, &purb->urb_link);
InsertTailList(&temp_list, pthis);
}
else
@@ -1313,7 +1313,7 @@
RemoveEntryList(&abort_list);
InsertTailList(pthis, cancel_list);
- pwork_item = (PWORK_QUEUE_ITEM) & cancel_list[1];
+ pwork_item = (PWORK_QUEUE_ITEM) (cancel_list + 1);
// we do not need to worry the uhci_cancel_pending_endp_urb running when the
// driver is unloading since it will prevent the dev_mgr to quit till all the
@@ -1426,7 +1426,7 @@
}
pending_endp->pendp = purb->pendp;
- InsertTailList(&uhci->pending_endp_list, (PLIST_ENTRY) pending_endp);
+ InsertTailList(&uhci->pending_endp_list, &pending_endp->endp_link );
unlock_dev(pdev, TRUE);
unlock_pending_endp_list(&uhci->pending_endp_list_lock);
@@ -1742,7 +1742,7 @@
purb->flags &= ~URB_FLAG_STATE_MASK;
purb->flags |= URB_FLAG_STATE_PENDING;
- InsertHeadList(&pendp->urb_list, (PLIST_ENTRY) purb);
+ InsertHeadList(&pendp->urb_list, &purb->urb_link);
}
pending_endp = alloc_pending_endp(&uhci->pending_endp_pool, 1);
@@ -2722,7 +2722,7 @@
if (pthis == NULL)
return FALSE;
- InsertTailList(&uhci->urb_list, (PLIST_ENTRY) urb);
+ InsertTailList(&uhci->urb_list, &urb->urb_link);
urb->flags &= ~URB_FLAG_STATE_MASK;
urb->flags |= URB_FLAG_STATE_IN_PROCESS | URB_FLAG_IN_SCHEDULE;