[PATCH 3/5] staging: vt6655: remove else after return and invert condition
From: Matej Dujava
Date: Sun May 03 2020 - 09:29:47 EST
This patch will prepare us to make return at the end of case body
Signed-off-by: Matej Dujava <mdujava@xxxxxxxxxxxx>
---
drivers/staging/vt6655/rxtx.c | 36 +++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 01ceace253a4..61f7077bb75f 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -260,13 +260,13 @@ s_uGetDataDuration(
byPktType, 14,
pDevice->byTopCCKBasicRate);
}
- if (((uMACfragNum == 1)) || bLastFrag) {/* Non Frag or Last Frag */
- if (bNeedAck) {
- return pDevice->uSIFS + uAckTime;
- } else {
+ /* Non Frag or Last Frag */
+ if ((uMACfragNum == 1) || bLastFrag) {
+ if (!bNeedAck)
return 0;
- }
- } else {/* First Frag or Mid Frag */
+ return pDevice->uSIFS + uAckTime;
+ } else {
+ /* First Frag or Mid Frag */
uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, len, wRate, bNeedAck);
return pDevice->uSIFS + uAckTime + uNextPktTime;
@@ -279,13 +279,13 @@ s_uGetDataDuration(
byPktType, 14,
pDevice->byTopOFDMBasicRate);
}
- if (((uMACfragNum == 1)) || bLastFrag) {/* Non Frag or Last Frag */
- if (bNeedAck) {
- return pDevice->uSIFS + uAckTime;
- } else {
+ /* Non Frag or Last Frag */
+ if ((uMACfragNum == 1) || bLastFrag) {
+ if (!bNeedAck)
return 0;
- }
- } else {/* First Frag or Mid Frag */
+ return pDevice->uSIFS + uAckTime;
+ } else {
+ /* First Frag or Mid Frag */
uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, len,
wRate, bNeedAck);
@@ -300,13 +300,13 @@ s_uGetDataDuration(
byPktType, 14,
pDevice->byTopOFDMBasicRate);
}
- if (((uMACfragNum == 1)) || bLastFrag) { /* Non Frag or Last Frag */
- if (bNeedAck) {
- return pDevice->uSIFS + uAckTime;
- } else {
+ /* Non Frag or Last Frag */
+ if ((uMACfragNum == 1) || bLastFrag) {
+ if (!bNeedAck)
return 0;
- }
- } else { /* First Frag or Mid Frag */
+ return pDevice->uSIFS + uAckTime;
+ } else {
+ /* First Frag or Mid Frag */
if (wRate < RATE_18M)
wRate = RATE_18M;
else if (wRate > RATE_54M)
--
2.26.2