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 2/2] staging: vt6655: fix LONG_LINE warning
Date: Sun, 3 May 2020 00:16:34 +0200 [thread overview]
Message-ID: <1588457794-31438-2-git-send-email-mdujava@kocurkovo.cz> (raw)
In-Reply-To: <1588457794-31438-1-git-send-email-mdujava@kocurkovo.cz>
This patch will fix LONG_LINE error from checkpatch, by createing temporary
variable so call to the function is not in if/else block.
Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz>
---
drivers/staging/vt6655/rxtx.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index dda578436e64..782177dfd67e 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -164,16 +164,24 @@ s_uGetTxRsvTime(
)
{
unsigned int uDataTime, uAckTime;
+ unsigned short basic_rate;
uDataTime = bb_get_frame_time(pDevice->byPreambleType, byPktType, cbFrameLength, wRate);
if (!bNeedAck)
return uDataTime;
- if (byPktType == PK_TYPE_11B) /* llb,CCK mode */
- uAckTime = bb_get_frame_time(pDevice->byPreambleType, byPktType, 14, (unsigned short)pDevice->byTopCCKBasicRate);
- else /* 11g 2.4G OFDM mode & 11a 5G OFDM mode */
- uAckTime = bb_get_frame_time(pDevice->byPreambleType, byPktType, 14, (unsigned short)pDevice->byTopOFDMBasicRate);
+ /*
+ * CCK mode - 11b
+ * OFDM mode - 11g 2.4G & 11a 5G
+ */
+ if (byPktType == PK_TYPE_11B)
+ basic_rate = (unsigned short)pDevice->byTopCCKBasicRate;
+ else
+ basic_rate = (unsigned short)pDevice->byTopOFDMBasicRate;
+
+ uAckTime = bb_get_frame_time(pDevice->byPreambleType, byPktType, 14,
+ basic_rate);
return uDataTime + pDevice->uSIFS + uAckTime;
}
--
2.26.2
next prev parent reply other threads:[~2020-05-02 22:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-02 22:16 [PATCH 1/2] staging: vt6655: return early if not bNeedAck Matej Dujava
2020-05-02 22:16 ` Matej Dujava [this message]
2020-05-03 5:11 ` [PATCH 2/2] staging: vt6655: fix LONG_LINE warning Joe Perches
2020-05-03 9:15 ` 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=1588457794-31438-2-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®