[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1445078365-28805-1-git-send-email-luisbg@osg.samsung.com>
Date: Sat, 17 Oct 2015 11:39:25 +0100
From: Luis de Bethencourt <luisbg@....samsung.com>
To: linux-kernel@...r.kernel.org
Cc: gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
cristina.opriceana@...il.com, shraddha.6596@...il.com,
hamohammed.sa@...il.com, gascoar@...il.com, gdonald@...il.com,
paul.gortmaker@...driver.com, dan.carpenter@...cle.com,
Luis de Bethencourt <luisbg@....samsung.com>
Subject: [PATCH v3] staging: rtl8192u: simplify conditional
The code can be much cleaner and readable by simplifying the conditional
statement.
Signed-off-by: Luis de Bethencourt <luisbg@....samsung.com>
---
Hi,
Dan Carpenter pointed out that the check needs to be >= and not just > because
ieee->state can change between the two if statements.
Thanks for the review!
Luis
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index f2d09fe..8b09c40 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -466,13 +466,9 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee)
/* this prevent excessive time wait when we
* need to wait for a syncro scan to end..
*/
- if(ieee->state < IEEE80211_LINKED)
- ;
- else
- if (ieee->sync_scan_hurryup)
+ if (ieee->state >= IEEE80211_LINKED && ieee->sync_scan_hurryup)
goto out;
-
msleep_interruptible_rsl(IEEE80211_SOFTMAC_SCAN_TIME);
}
--
2.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists