[USBPORT] Rename variables only in USB2_AllocateTimeForEndpoint().

This commit is contained in:
Vadim Galyant 2017-12-13 19:46:18 +09:00 committed by Amine Khaldi
parent 3ba9fffbb2
commit bbbcb1dc75

View file

@ -953,8 +953,8 @@ USB2_AllocateTimeForEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint,
ULONG TransferType; ULONG TransferType;
ULONG Overhead; ULONG Overhead;
ULONG LatestStart; ULONG LatestStart;
PUSB2_TT_ENDPOINT prevTtEndpoint; PUSB2_TT_ENDPOINT prevEndpoint;
PUSB2_TT_ENDPOINT nextTtEndpoint; PUSB2_TT_ENDPOINT nextEndpoint;
PUSB2_TT_ENDPOINT IntEndpoint; PUSB2_TT_ENDPOINT IntEndpoint;
ULONG StartTime; ULONG StartTime;
ULONG calcBusTime; ULONG calcBusTime;
@ -1123,25 +1123,25 @@ USB2_AllocateTimeForEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint,
} }
if (TransferType == USBPORT_TRANSFER_TYPE_ISOCHRONOUS) if (TransferType == USBPORT_TRANSFER_TYPE_ISOCHRONOUS)
prevTtEndpoint = Tt->FrameBudget[frame].IsoEndpoint; prevEndpoint = Tt->FrameBudget[frame].IsoEndpoint;
else else
prevTtEndpoint = Tt->FrameBudget[frame].IntEndpoint; prevEndpoint = Tt->FrameBudget[frame].IntEndpoint;
for (nextTtEndpoint = prevTtEndpoint->NextTtEndpoint; for (nextEndpoint = prevEndpoint->NextTtEndpoint;
nextTtEndpoint; nextEndpoint;
nextTtEndpoint = nextTtEndpoint->NextTtEndpoint) nextEndpoint = nextEndpoint->NextTtEndpoint)
{ {
if (USB2_CheckTtEndpointInsert(nextTtEndpoint, TtEndpoint)) if (USB2_CheckTtEndpointInsert(nextEndpoint, TtEndpoint))
{ {
break; break;
} }
prevTtEndpoint = nextTtEndpoint; prevEndpoint = nextEndpoint;
} }
StartTime = USB2_GetStartTime(nextTtEndpoint, StartTime = USB2_GetStartTime(nextEndpoint,
TtEndpoint, TtEndpoint,
prevTtEndpoint, prevEndpoint,
frame); frame);
if (StartTime > LatestStart) if (StartTime > LatestStart)
@ -1174,15 +1174,15 @@ USB2_AllocateTimeForEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint,
else else
{ {
IntEndpoint = Tt->FrameBudget[ix].IntEndpoint; IntEndpoint = Tt->FrameBudget[ix].IntEndpoint;
nextTtEndpoint = IntEndpoint->NextTtEndpoint; nextEndpoint = IntEndpoint->NextTtEndpoint;
for (nextTtEndpoint = IntEndpoint->NextTtEndpoint; for (nextEndpoint = IntEndpoint->NextTtEndpoint;
nextTtEndpoint; nextEndpoint;
nextTtEndpoint = nextTtEndpoint->NextTtEndpoint) nextEndpoint = nextEndpoint->NextTtEndpoint)
{ {
if (USB2_CheckTtEndpointInsert(nextTtEndpoint, TtEndpoint)) if (USB2_CheckTtEndpointInsert(nextEndpoint, TtEndpoint))
break; break;
IntEndpoint = nextTtEndpoint; IntEndpoint = nextEndpoint;
} }
if ((frame % TtEndpoint->ActualPeriod) == 0) if ((frame % TtEndpoint->ActualPeriod) == 0)
@ -1191,10 +1191,10 @@ USB2_AllocateTimeForEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint,
} }
else else
{ {
if (nextTtEndpoint) if (nextEndpoint)
{ {
calcBusTime = LatestStart + TtEndpoint->CalcBusTime - calcBusTime = LatestStart + TtEndpoint->CalcBusTime -
nextTtEndpoint->StartTime; nextEndpoint->StartTime;
} }
else else
{ {
@ -1215,21 +1215,21 @@ USB2_AllocateTimeForEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint,
} }
} }
if (nextTtEndpoint != TtEndpoint) if (nextEndpoint != TtEndpoint)
{ {
if ((frame % TtEndpoint->ActualPeriod) == 0) if ((frame % TtEndpoint->ActualPeriod) == 0)
{ {
if (frame == 0) if (frame == 0)
{ {
DPRINT("USB2_AllocateTimeForEndpoint: frame == 0\n"); DPRINT("USB2_AllocateTimeForEndpoint: frame == 0\n");
TtEndpoint->NextTtEndpoint = nextTtEndpoint; TtEndpoint->NextTtEndpoint = nextEndpoint;
} }
IntEndpoint->NextTtEndpoint = TtEndpoint; IntEndpoint->NextTtEndpoint = TtEndpoint;
DPRINT("USB2_AllocateTimeForEndpoint: TtEndpoint - %p, nextTtEndpoint - %p\n", DPRINT("USB2_AllocateTimeForEndpoint: TtEndpoint - %p, nextEndpoint - %p\n",
TtEndpoint, TtEndpoint,
nextTtEndpoint); nextEndpoint);
} }
if (calcBusTime > 0) if (calcBusTime > 0)
@ -1237,15 +1237,15 @@ USB2_AllocateTimeForEndpoint(IN PUSB2_TT_ENDPOINT TtEndpoint,
BOOLEAN IsMoved; BOOLEAN IsMoved;
BOOLEAN MoveResult; BOOLEAN MoveResult;
DPRINT("USB2_AllocateTimeForEndpoint: nextTtEndpoint - %p, calcBusTime - %X\n", DPRINT("USB2_AllocateTimeForEndpoint: nextEndpoint - %p, calcBusTime - %X\n",
nextTtEndpoint, nextEndpoint,
calcBusTime); calcBusTime);
for (; for (;
nextTtEndpoint; nextEndpoint;
nextTtEndpoint = nextTtEndpoint->NextTtEndpoint) nextEndpoint = nextEndpoint->NextTtEndpoint)
{ {
MoveResult = USB2_MoveTtEndpoint(nextTtEndpoint, MoveResult = USB2_MoveTtEndpoint(nextEndpoint,
calcBusTime, calcBusTime,
Rebalance, Rebalance,
*RebalanceListEntries, *RebalanceListEntries,