[PATCHv3 03/15] staging: rtl8192u: r8192U_core: reverse conditions to get lines under 80 characters

Raphaël Beamonte
2015-09-20T17:16:33Z

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@gmail.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 2abc3e77..7fe86ff 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -196,18 +196,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;

@@ -1082,17 +1083,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