From: Matej Dujava <mdujava@kocurkovo.cz>
To: Forest Bond <forest@alittletooquiet.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: Stefano Brivio <sbrivio@redhat.com>,
Briana Oursler <briana.oursler@gmail.com>,
"Frank A. Cancio Bello" <frank@generalsoftwareinc.com>,
Matej Dujava <mdujava@kocurkovo.cz>
Subject: [PATCH 4/5] staging: vt6655: return at the ond of case body
Date: Sun, 3 May 2020 15:29:11 +0200 [thread overview]
Message-ID: <1588512552-12297-5-git-send-email-mdujava@kocurkovo.cz> (raw)
In-Reply-To: <1588512552-12297-1-git-send-email-mdujava@kocurkovo.cz>
This patch will unify exit point for s_uGetDataDuration function.
Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz>
---
drivers/staging/vt6655/rxtx.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 61f7077bb75f..c4d62c27f1c1 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -264,14 +264,12 @@ s_uGetDataDuration(
if ((uMACfragNum == 1) || bLastFrag) {
if (!bNeedAck)
return 0;
- return pDevice->uSIFS + uAckTime;
} else {
/* First Frag or Mid Frag */
uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, len, wRate, bNeedAck);
-
- return pDevice->uSIFS + uAckTime + uNextPktTime;
}
- break;
+
+ return pDevice->uSIFS + uAckTime + uNextPktTime;
case DATADUR_A: /* DATADUR_A */
if (bNeedAck) {
@@ -283,15 +281,13 @@ s_uGetDataDuration(
if ((uMACfragNum == 1) || bLastFrag) {
if (!bNeedAck)
return 0;
- return pDevice->uSIFS + uAckTime;
} else {
/* First Frag or Mid Frag */
uNextPktTime = s_uGetTxRsvTime(pDevice, byPktType, len,
wRate, bNeedAck);
-
- return pDevice->uSIFS + uAckTime + uNextPktTime;
}
- break;
+
+ return pDevice->uSIFS + uAckTime + uNextPktTime;
case DATADUR_A_F0: /* DATADUR_A_F0 */
case DATADUR_A_F1: /* DATADUR_A_F1 */
@@ -304,7 +300,6 @@ s_uGetDataDuration(
if ((uMACfragNum == 1) || bLastFrag) {
if (!bNeedAck)
return 0;
- return pDevice->uSIFS + uAckTime;
} else {
/* First Frag or Mid Frag */
if (wRate < RATE_18M)
@@ -323,10 +318,9 @@ s_uGetDataDuration(
wFB_Opt1[FB_RATE0][wRate - RATE_18M],
bNeedAck);
}
-
- return pDevice->uSIFS + uAckTime + uNextPktTime;
}
- break;
+
+ return pDevice->uSIFS + uAckTime + uNextPktTime;
default:
break;
--
2.26.2
next prev parent reply other threads:[~2020-05-03 13:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-03 13:29 [PATCH 0/5] Cleaning s_uGetDataDuration function Matej Dujava
2020-05-03 13:29 ` [PATCH 1/5] staging: vt6655: merge two switch cases in s_uGetDataDuration Matej Dujava
2020-05-03 13:29 ` [PATCH 2/5] staging: vt6655: do calculation of uAckTime first Matej Dujava
2020-05-03 13:29 ` [PATCH 3/5] staging: vt6655: remove else after return and invert condition Matej Dujava
2020-05-03 13:29 ` Matej Dujava [this message]
2020-05-03 13:29 ` [PATCH 5/5] staging: vt6655: extract index manupulation out of function call Matej Dujava
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1588512552-12297-5-git-send-email-mdujava@kocurkovo.cz \
--to=mdujava@kocurkovo.cz \
--cc=briana.oursler@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=forest@alittletooquiet.net \
--cc=frank@generalsoftwareinc.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®