diff options
author | Caveh Jalali <caveh@chromium.org> | 2020-09-01 20:37:49 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-11-22 22:34:52 +0000 |
commit | 8079a6a558526730d994aa56bf23139fbad2141c (patch) | |
tree | 15d05cd04e074ac51eafbfd4ebf8c3d8a6ec05bc /payloads/libpayload/drivers/usb/xhci.c | |
parent | 2a70419e7c9523cc9c40303bd3355e24b01ea603 (diff) |
libpayload/usb: Fix printf format string mismatches in debug messages
This fixes format string mismatch errors in the USB subsystem found by
the compiler's format string checker.
BUG=b:167517417
TEST=enabled all USB controllers on volteer and fixed resulting
compiler errors when USB_DEBUG is enabled.
Change-Id: I4dc70baefb3cd82fcc915cc2e7f68719cf6870cc
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45024
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'payloads/libpayload/drivers/usb/xhci.c')
-rw-r--r-- | payloads/libpayload/drivers/usb/xhci.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c index 749ff0a066..c40e641c4c 100644 --- a/payloads/libpayload/drivers/usb/xhci.c +++ b/payloads/libpayload/drivers/usb/xhci.c @@ -194,7 +194,7 @@ xhci_init (unsigned long physical_bar) xhci->hcrreg = phys_to_virt(physical_bar) + xhci->capreg->rtsoff; xhci->dbreg = phys_to_virt(physical_bar) + xhci->capreg->dboff; - xhci_debug("regbase: 0x%"PRIx32"\n", physical_bar); + xhci_debug("regbase: 0x%"PRIxPTR"\n", physical_bar); xhci_debug("caplen: 0x%"PRIx32"\n", CAP_GET(CAPLEN, xhci->capreg)); xhci_debug("rtsoff: 0x%"PRIx32"\n", xhci->capreg->rtsoff); xhci_debug("dboff: 0x%"PRIx32"\n", xhci->capreg->dboff); @@ -208,8 +208,8 @@ xhci_init (unsigned long physical_bar) } xhci_debug("context size: %dB\n", CTXSIZE(xhci)); - xhci_debug("maxslots: 0x%02lx\n", CAP_GET(MAXSLOTS, xhci->capreg)); - xhci_debug("maxports: 0x%02lx\n", CAP_GET(MAXPORTS, xhci->capreg)); + xhci_debug("maxslots: 0x%02"PRIx32"\n", CAP_GET(MAXSLOTS, xhci->capreg)); + xhci_debug("maxports: 0x%02"PRIx32"\n", CAP_GET(MAXPORTS, xhci->capreg)); const unsigned pagesize = xhci->opreg->pagesize << 12; xhci_debug("pagesize: 0x%04x\n", pagesize); @@ -374,7 +374,7 @@ xhci_reinit (hci_t *controller) /* Initialize command ring */ xhci_init_cycle_ring(&xhci->cr, COMMAND_RING_SIZE); - xhci_debug("command ring @%p (0x%08x)\n", + xhci_debug("command ring @%p (0x%08"PRIxPTR")\n", xhci->cr.ring, virt_to_phys(xhci->cr.ring)); xhci->opreg->crcr_lo = virt_to_phys(xhci->cr.ring) | CRCR_RCS; xhci->opreg->crcr_hi = 0; @@ -384,9 +384,9 @@ xhci_reinit (hci_t *controller) /* Initialize event ring */ xhci_reset_event_ring(&xhci->er); - xhci_debug("event ring @%p (0x%08x)\n", + xhci_debug("event ring @%p (0x%08"PRIxPTR")\n", xhci->er.ring, virt_to_phys(xhci->er.ring)); - xhci_debug("ERST Max: 0x%lx -> 0x%lx entries\n", + xhci_debug("ERST Max: 0x%"PRIx32" -> 0x%x entries\n", CAP_GET(ERST_MAX, xhci->capreg), 1 << CAP_GET(ERST_MAX, xhci->capreg)); memset((void*)xhci->ev_ring_table, 0x00, sizeof(erst_entry_t)); |