From: Briana Oursler Date: Wed, 1 Apr 2020 18:03:39 +0000 (-0700) Subject: Staging: vt6655: Limit return statements. X-Git-Tag: v5.15~3664^2~413 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b0578364fb875366de08686593f9fc6ce2ce564;p=platform%2Fkernel%2Flinux-starfive.git Staging: vt6655: Limit return statements. Limit return statements within context of switch case to improve readability. Signed-off-by: Briana Oursler Reviewed-by: Stefano Brivio Link: https://lore.kernel.org/r/fe417533b66d29ef6ea19128b38b8c8de7757ae2.1585763457.git.briana.oursler@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index a1ddd79..30777d6 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -263,12 +263,9 @@ s_uGetDataDuration( else uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); - if (bNeedAck) { + if (bNeedAck) uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopCCKBasicRate); - return pDevice->uSIFS + uAckTime + uNextPktTime; - } else { - return pDevice->uSIFS + uNextPktTime; - } + return pDevice->uSIFS + uAckTime + uNextPktTime; } break; @@ -286,12 +283,9 @@ s_uGetDataDuration( else uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wRate, bNeedAck); - if (bNeedAck) { + if (bNeedAck) uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); - return pDevice->uSIFS + uAckTime + uNextPktTime; - } else { - return pDevice->uSIFS + uNextPktTime; - } + return pDevice->uSIFS + uAckTime + uNextPktTime; } break; @@ -327,12 +321,9 @@ s_uGetDataDuration( uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE0][wRate-RATE_18M], bNeedAck); } - if (bNeedAck) { + if (bNeedAck) uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); - return pDevice->uSIFS + uAckTime + uNextPktTime; - } else { - return pDevice->uSIFS + uNextPktTime; - } + return pDevice->uSIFS + uAckTime + uNextPktTime; } break; @@ -367,12 +358,10 @@ s_uGetDataDuration( else uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, cbFrameLength, wFB_Opt1[FB_RATE1][wRate-RATE_18M], bNeedAck); } - if (bNeedAck) { + + if (bNeedAck) uAckTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, 14, pDevice->byTopOFDMBasicRate); - return pDevice->uSIFS + uAckTime + uNextPktTime; - } else { - return pDevice->uSIFS + uNextPktTime; - } + return pDevice->uSIFS + uAckTime + uNextPktTime; } break;