summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/usb/usb.c
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2020-09-01 20:37:49 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-11-22 22:34:52 +0000
commit8079a6a558526730d994aa56bf23139fbad2141c (patch)
tree15d05cd04e074ac51eafbfd4ebf8c3d8a6ec05bc /payloads/libpayload/drivers/usb/usb.c
parent2a70419e7c9523cc9c40303bd3355e24b01ea603 (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/usb.c')
-rw-r--r--payloads/libpayload/drivers/usb/usb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/usb/usb.c b/payloads/libpayload/drivers/usb/usb.c
index ec49a5481e..ed33147c51 100644
--- a/payloads/libpayload/drivers/usb/usb.c
+++ b/payloads/libpayload/drivers/usb/usb.c
@@ -28,6 +28,7 @@
//#define USB_DEBUG
+#include <inttypes.h>
#include <libpayload-config.h>
#include <usb/usb.h>
@@ -229,7 +230,7 @@ get_free_address (hci_t *controller)
int i = controller->latest_address + 1;
for (; i != controller->latest_address; i++) {
if (i >= ARRAY_SIZE(controller->devices) || i < 1) {
- usb_debug("WARNING: Device addresses for controller %#x"
+ usb_debug("WARNING: Device addresses for controller %#" PRIxPTR
" wrapped around!\n", controller->reg_base);
i = 0;
continue;