From 9ff9025759841c760a7330f12ab4719d6a295a79 Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Sun, 19 Jun 2016 11:04:50 +0900 Subject: [PATCH] XHCI: Increase fScratchpadCount size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * To fix clang's '-Wtautological-constant-out-of-range-compare' warnings in xhci.cpp. * by korli: adjust trace print macro. Signed-off-by: Jérôme Duval --- src/add-ons/kernel/busses/usb/xhci.cpp | 3 ++- src/add-ons/kernel/busses/usb/xhci.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/busses/usb/xhci.cpp b/src/add-ons/kernel/busses/usb/xhci.cpp index 9d5e590d19..eedcf7b2b4 100644 --- a/src/add-ons/kernel/busses/usb/xhci.cpp +++ b/src/add-ons/kernel/busses/usb/xhci.cpp @@ -425,7 +425,8 @@ XHCI::Start() uint32 params2 = ReadCapReg32(XHCI_HCSPARAMS2); fScratchpadCount = HCS_MAX_SC_BUFFERS(params2); if (fScratchpadCount > XHCI_MAX_SCRATCHPADS) { - TRACE_ERROR("Invalid number of scratchpads: %u\n", fScratchpadCount); + TRACE_ERROR("Invalid number of scratchpads: %" B_PRIu32 "\n", + fScratchpadCount); return B_ERROR; } diff --git a/src/add-ons/kernel/busses/usb/xhci.h b/src/add-ons/kernel/busses/usb/xhci.h index fc2d028e19..3657c0cb8d 100644 --- a/src/add-ons/kernel/busses/usb/xhci.h +++ b/src/add-ons/kernel/busses/usb/xhci.h @@ -242,7 +242,7 @@ private: uint8 fPortSlots[XHCI_MAX_PORTS]; // Scratchpad - uint8 fScratchpadCount; + uint32 fScratchpadCount; area_id fScratchpadArea[XHCI_MAX_SCRATCHPADS]; void * fScratchpad[XHCI_MAX_SCRATCHPADS];