From: Lorenzo Stoakes <lstoakes@gmail.com>
To: gregkh@linuxfoundation.org
Cc: anarey@gmail.com, mcgrof@do-not-panic.com,
tapaswenipathak@gmail.com, joe@perches.com, rmfrfs@gmail.com,
yejiayily@gmail.com, gdonald@gmail.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Lorenzo Stoakes <lstoakes@gmail.com>
Subject: [PATCH v2 4/4] staging: rtl8192u: Refactor heavy nesting
Date: Wed, 31 Dec 2014 21:10:43 +0000 [thread overview]
Message-ID: <1420060243-10685-4-git-send-email-lstoakes@gmail.com> (raw)
In-Reply-To: <1420060243-10685-1-git-send-email-lstoakes@gmail.com>
This patch fixes warnings raised by checkpatch.pl relating to heavily indented
lines in r8192U_dm.c. It refactors a couple of else if cases to achieve the same
outcome indented by one fewer tab. It additionally updateds comment positioning
to be consistent across these cases.
Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
---
drivers/staging/rtl8192u/r8192U_dm.c | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index ed566bb..bae8511 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -2581,28 +2581,25 @@ static void dm_rxpath_sel_byrssi(struct net_device *dev)
cck_rx_ver2_sec_index = cck_rx_ver2_max_index;
tmp_cck_max_pwdb = cur_cck_pwdb;
cck_rx_ver2_max_index = i;
- } else if (cur_cck_pwdb == tmp_cck_max_pwdb) { /* let sec and min point to the different index */
+ } else if (cur_cck_pwdb == tmp_cck_max_pwdb) {
+ /* let sec and min point to the different index */
tmp_cck_sec_pwdb = cur_cck_pwdb;
cck_rx_ver2_sec_index = i;
} else if ((cur_cck_pwdb < tmp_cck_max_pwdb) && (cur_cck_pwdb > tmp_cck_sec_pwdb)) {
tmp_cck_sec_pwdb = cur_cck_pwdb;
cck_rx_ver2_sec_index = i;
- } else if (cur_cck_pwdb == tmp_cck_sec_pwdb) {
- if (tmp_cck_sec_pwdb == tmp_cck_min_pwdb) { /* let sec and min point to the different index */
- tmp_cck_sec_pwdb = cur_cck_pwdb;
- cck_rx_ver2_sec_index = i;
- } else {
- /* This case we don't need to set any index */
- }
+ } else if (cur_cck_pwdb == tmp_cck_sec_pwdb && tmp_cck_sec_pwdb == tmp_cck_min_pwdb) {
+ /* let sec and min point to the different index */
+ tmp_cck_sec_pwdb = cur_cck_pwdb;
+ cck_rx_ver2_sec_index = i;
+ /* otherwise we don't need to set any index */
} else if ((cur_cck_pwdb < tmp_cck_sec_pwdb) && (cur_cck_pwdb > tmp_cck_min_pwdb)) {
/* This case we don't need to set any index */
- } else if (cur_cck_pwdb == tmp_cck_min_pwdb) {
- if (tmp_cck_sec_pwdb == tmp_cck_min_pwdb) { /* let sec and min point to the different index */
- tmp_cck_min_pwdb = cur_cck_pwdb;
- cck_rx_ver2_min_index = i;
- } else {
- /* This case we don't need to set any index */
- }
+ } else if (cur_cck_pwdb == tmp_cck_min_pwdb && tmp_cck_sec_pwdb == tmp_cck_min_pwdb) {
+ /* let sec and min point to the different index */
+ tmp_cck_min_pwdb = cur_cck_pwdb;
+ cck_rx_ver2_min_index = i;
+ /* otherwise we don't need to set any index */
} else if (cur_cck_pwdb < tmp_cck_min_pwdb) {
tmp_cck_min_pwdb = cur_cck_pwdb;
cck_rx_ver2_min_index = i;
--
2.2.1
next prev parent reply other threads:[~2014-12-31 21:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-31 21:10 [PATCH v2 1/4] staging: rtl8192u: fix comments Lorenzo Stoakes
2014-12-31 21:10 ` [PATCH v2 2/4] staging: rtl8192u: fix whitespace Lorenzo Stoakes
2014-12-31 21:20 ` Joe Perches
2014-12-31 21:28 ` Lorenzo Stoakes
2014-12-31 21:33 ` [PATCH v3 " Lorenzo Stoakes
2015-01-01 4:47 ` Sudip Mukherjee
2015-01-01 5:40 ` Joe Perches
2015-01-01 6:28 ` Sudip Mukherjee
2015-01-01 10:06 ` Lorenzo Stoakes
2014-12-31 21:10 ` [PATCH v2 3/4] staging: rtl8192u: remove redundant code Lorenzo Stoakes
2015-01-01 4:49 ` Sudip Mukherjee
2015-01-01 4:58 ` Sudip Mukherjee
2015-01-01 10:12 ` Lorenzo Stoakes
2014-12-31 21:10 ` Lorenzo Stoakes [this message]
2015-01-10 17:58 ` [PATCH v2 1/4] staging: rtl8192u: fix comments Greg KH
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=1420060243-10685-4-git-send-email-lstoakes@gmail.com \
--to=lstoakes@gmail.com \
--cc=anarey@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gdonald@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@do-not-panic.com \
--cc=rmfrfs@gmail.com \
--cc=tapaswenipathak@gmail.com \
--cc=yejiayily@gmail.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