[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <06213f8ebb5639959f71fa034583585a693d20a9.1441955761.git.raphael.beamonte@gmail.com>
Date: Fri, 11 Sep 2015 03:29:12 -0400
From: Raphaël Beamonte <raphael.beamonte@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Dan Carpenter <dan.carpenter@...cle.com>,
Raphaël Beamonte <raphael.beamonte@...il.com>,
Cristina Opriceana <cristina.opriceana@...il.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCHv2 04/16] staging: rtl8192u: r8192U_core: reverse conditions to get lines under 80 characters
Reverse some conditions to clean the code and allow to have lines
under 80 characters, as to follow the kernel code style.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@...il.com>
---
drivers/staging/rtl8192u/r8192U_core.c | 48 ++++++++++++++++++----------------
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index c8724cd..85dfcbb 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -202,18 +202,19 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
__func__);
}
cl = ChannelPlan[channel_plan];
- if (cl.Len != 0) {
- /* Clear old channel map */
- memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
- sizeof(GET_DOT11D_INFO(ieee)->channel_map));
- /* Set new channel map */
- for (i = 0; i < cl.Len; i++) {
- u8 chan = cl.Channel[i];
-
- if (chan < min_chan || chan > max_chan)
- break;
- GET_DOT11D_INFO(ieee)->channel_map[chan] = 1;
- }
+ if (cl.Len == 0)
+ break;
+
+ /* Clear old channel map */
+ memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
+ sizeof(GET_DOT11D_INFO(ieee)->channel_map));
+ /* Set new channel map */
+ for (i = 0; i < cl.Len; i++) {
+ u8 chan = cl.Channel[i];
+
+ if (chan < min_chan || chan > max_chan)
+ break;
+ GET_DOT11D_INFO(ieee)->channel_map[chan] = 1;
}
break;
@@ -1088,17 +1089,18 @@ static void rtl8192_tx_isr(struct urb *tx_urb)
*/
/* Handle MPDU in wait queue. */
- if (queue_index != BEACON_QUEUE) {
- /* Don't send data frame during scanning.*/
- if ((skb_queue_len(&priv->ieee80211->skb_waitQ[queue_index]) != 0) &&
- (!(priv->ieee80211->queue_stop))) {
- skb = skb_dequeue(&(priv->ieee80211->skb_waitQ[queue_index]));
- if (skb)
- priv->ieee80211->softmac_hard_start_xmit(skb,
- dev);
-
- return; /* avoid further processing AMSDU */
- }
+ if (queue_index == BEACON_QUEUE)
+ return;
+
+ /* Don't send data frame during scanning.*/
+ if ((skb_queue_len(&priv->ieee80211->skb_waitQ[queue_index]) != 0) &&
+ (!(priv->ieee80211->queue_stop))) {
+ skb = skb_dequeue(&(priv->ieee80211->skb_waitQ[queue_index]));
+ if (skb)
+ priv->ieee80211->softmac_hard_start_xmit(skb,
+ dev);
+
+ return; /* avoid further processing AMSDU */
}
}
--
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