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>
This commit is contained in:
Caveh Jalali
2020-09-01 20:37:49 -07:00
committed by Patrick Georgi
parent 2a70419e7c
commit 8079a6a558
5 changed files with 33 additions and 27 deletions

View File

@@ -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;