summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r--payloads/libpayload/drivers/storage/ahci_common.c4
-rw-r--r--payloads/libpayload/drivers/usb/uhci.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/payloads/libpayload/drivers/storage/ahci_common.c b/payloads/libpayload/drivers/storage/ahci_common.c
index f3abc5f7fb..abc67c3656 100644
--- a/payloads/libpayload/drivers/storage/ahci_common.c
+++ b/payloads/libpayload/drivers/storage/ahci_common.c
@@ -66,7 +66,7 @@ static u8 *ahci_prdbuf_init(ahci_dev_t *const dev,
u8 *const user_buf, const size_t len,
const int out)
{
- if ((u32)user_buf & 1) {
+ if ((uintptr_t)user_buf & 1) {
printf("ahci: Odd buffer pointer (%p).\n", user_buf);
if (dev->buf) /* orphaned buffer */
free(dev->buf - *(dev->buf - 1));
@@ -76,7 +76,7 @@ static u8 *ahci_prdbuf_init(ahci_dev_t *const dev,
dev->user_buf = user_buf;
dev->write_back = !out;
dev->buflen = len;
- if ((u32)dev->buf & 1) {
+ if ((uintptr_t)dev->buf & 1) {
dev->buf[0] = 1;
dev->buf += 1;
} else {
diff --git a/payloads/libpayload/drivers/usb/uhci.c b/payloads/libpayload/drivers/usb/uhci.c
index eb252cd8ad..7590ab3c85 100644
--- a/payloads/libpayload/drivers/usb/uhci.c
+++ b/payloads/libpayload/drivers/usb/uhci.c
@@ -274,7 +274,7 @@ uhci_stop(hci_t *controller)
#define UHCI_SLEEP_TIME_US 30
#define UHCI_TIMEOUT (USB_MAX_PROCESSING_TIME_US / UHCI_SLEEP_TIME_US)
-#define GET_TD(x) ((void*)(((unsigned int)(x))&~0xf))
+#define GET_TD(x) ((void *)(((unsigned long)(x))&~0xf))
static td_t *
wait_for_completed_qh(hci_t *controller, qh_t *qh)