summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-04-28 08:34:34 +0300
committerToomas Soome <tsoome@me.com>2019-05-16 21:30:41 +0300
commit3eb8c55c1d853cead5cb89c78b077de199f0fb6a (patch)
tree7f8511723a92a5dbb0f6f830f3a46724ba888583
parent0a1044f1d1346ec799488913a15abfae3e3c848a (diff)
downloadillumos-joyent-3eb8c55c1d853cead5cb89c78b077de199f0fb6a.tar.gz
10868 ohci: comparison between pointer and integer
Reviewed by: Gergő Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/common/io/usb/hcd/openhci/ohci.c14
-rw-r--r--usr/src/uts/common/io/usb/hcd/openhci/ohci_polled.c4
2 files changed, 9 insertions, 9 deletions
diff --git a/usr/src/uts/common/io/usb/hcd/openhci/ohci.c b/usr/src/uts/common/io/usb/hcd/openhci/ohci.c
index 2148c344d8..00a2eafc9e 100644
--- a/usr/src/uts/common/io/usb/hcd/openhci/ohci.c
+++ b/usr/src/uts/common/io/usb/hcd/openhci/ohci.c
@@ -4605,7 +4605,7 @@ ohci_insert_ed_on_reclaim_list(
ohcip->ohci_reclaim_list = ept;
}
- ASSERT(Get_ED(ept->hced_reclaim_next) == NULL);
+ ASSERT(Get_ED(ept->hced_reclaim_next) == 0);
/* Enable the SOF interrupt */
Set_OpReg(hcr_intr_enable, HCR_INTR_SOF);
@@ -6038,9 +6038,9 @@ ohci_fill_in_td(
/* Set the transfer wrapper */
ASSERT(tw != NULL);
- ASSERT(tw->tw_id != NULL);
+ ASSERT(tw->tw_id != 0);
- Set_TD(td->hctd_trans_wrapper, (uint32_t)tw->tw_id);
+ Set_TD(td->hctd_trans_wrapper, tw->tw_id);
Set_TD(td->hctd_tw_next_td, NULL);
}
@@ -6404,7 +6404,7 @@ ohci_insert_td_on_tw(
tw->tw_hctd_tail = td;
- ASSERT(Get_TD(td->hctd_tw_next_td) == NULL);
+ ASSERT(Get_TD(td->hctd_tw_next_td) == 0);
}
}
@@ -6971,7 +6971,7 @@ dmadone:
/* Get and Store 32bit ID */
tw->tw_id = OHCI_GET_ID((void *)tw);
- ASSERT(tw->tw_id != NULL);
+ ASSERT(tw->tw_id != 0);
USB_DPRINTF_L4(PRINT_MASK_ALLOC, ohcip->ohci_log_hdl,
"ohci_create_transfer_wrapper: tw = 0x%p, ncookies = %u",
@@ -7205,7 +7205,7 @@ ohci_create_isoc_transfer_wrapper(
/* Get and Store 32bit ID */
tw->tw_id = OHCI_GET_ID((void *)tw);
- ASSERT(tw->tw_id != NULL);
+ ASSERT(tw->tw_id != 0);
USB_DPRINTF_L4(PRINT_MASK_ALLOC, ohcip->ohci_log_hdl,
"ohci_create_isoc_transfer_wrapper: tw = 0x%p", (void *)tw);
@@ -7619,7 +7619,7 @@ ohci_free_tw(
"ohci_free_tw: tw = 0x%p", (void *)tw);
ASSERT(tw != NULL);
- ASSERT(tw->tw_id != NULL);
+ ASSERT(tw->tw_id != 0);
/* Free 32bit ID */
OHCI_FREE_ID((uint32_t)tw->tw_id);
diff --git a/usr/src/uts/common/io/usb/hcd/openhci/ohci_polled.c b/usr/src/uts/common/io/usb/hcd/openhci/ohci_polled.c
index 08ac2730f7..00fa23abcb 100644
--- a/usr/src/uts/common/io/usb/hcd/openhci/ohci_polled.c
+++ b/usr/src/uts/common/io/usb/hcd/openhci/ohci_polled.c
@@ -2023,7 +2023,7 @@ ohci_polled_insert_td_on_tw(
Set_TD(dummy->hctd_tw_next_td, ohci_td_cpu_to_iommu(ohcip, td));
tw->tw_hctd_tail = td;
- ASSERT(Get_TD(td->hctd_tw_next_td) == NULL);
+ ASSERT(Get_TD(td->hctd_tw_next_td) == 0);
}
}
@@ -2215,7 +2215,7 @@ ohci_polled_create_tw(
/* Get and Store 32bit ID */
tw->tw_id = OHCI_GET_ID((void *)tw);
- ASSERT(tw->tw_id != NULL);
+ ASSERT(tw->tw_id != 0);
pipe_dir = ph->p_ep.bEndpointAddress & USB_EP_DIR_MASK;
tw->tw_direction = (pipe_dir == USB_EP_DIR_IN) ? HC_TD_IN : HC_TD_OUT;