Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751783AbaLaSvI (ORCPT ); Wed, 31 Dec 2014 13:51:08 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:64567 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751707AbaLaSvG (ORCPT ); Wed, 31 Dec 2014 13:51:06 -0500 From: Lorenzo Stoakes 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 Subject: [PATCH 4/4] staging: rtl8192u: Refactor heavy nesting Date: Wed, 31 Dec 2014 18:42:56 +0000 Message-Id: <1420051376-31180-4-git-send-email-lstoakes@gmail.com> X-Mailer: git-send-email 2.2.1 In-Reply-To: <1420051376-31180-1-git-send-email-lstoakes@gmail.com> References: <1420051376-31180-1-git-send-email-lstoakes@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3035 Lines: 62 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 --- 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 0839ea7..72d1f47 100644 --- a/drivers/staging/rtl8192u/r8192U_dm.c +++ b/drivers/staging/rtl8192u/r8192U_dm.c @@ -2585,28 +2585,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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/