XHCI: Increase fScratchpadCount size

* 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 <[email protected]>
This commit is contained in:
Murai Takashi
2016-06-19 11:52:18 +02:00
committed by Jérôme Duval
parent ef9b129675
commit 9ff9025759
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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];