[PATCHv2 04/16] staging: rtl8192u: r8192U_core: reverse conditions to get lines under 80 characters
From: RaphaÃl Beamonte
Date: Fri Sep 11 2015 - 03:31:27 EST
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@xxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/