code review: fall through in interruptReadHandler intentional?
RehabMan opened this issue · comments
RehabMan commented
This code:
void BrcmPatchRAM::interruptReadHandler(void* parameter, IOReturn status, UInt32 bufferSizeRemaining)
{
...
switch (status)
{
case kIOReturnOverrun:
DebugLog("[%04x:%04x]: read - kIOReturnOverrun\n", mVendorId, mProductId);
mInterruptPipe->ClearStall();
case kIOReturnSuccess:
Is the fall through on the kIOReturnOverrun case intentional?
To make it obvious, I always add a comment to make it clear...
void BrcmPatchRAM::interruptReadHandler(void* parameter, IOReturn status, UInt32 bufferSizeRemaining)
{
...
switch (status)
{
case kIOReturnOverrun:
DebugLog("[%04x:%04x]: read - kIOReturnOverrun\n", mVendorId, mProductId);
mInterruptPipe->ClearStall();
// fall through...
case kIOReturnSuccess:
Darkvoid commented
No I cannot remember it being intentional.
Code has not been used in a while though as continuous read is the active branch.
As suggested I will merge continuous read over master and close the continuous read branch.