[PATCHv2 04/16] staging: rtl8192u: r8192U_core: reverse conditions to get lines under 80 characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux