Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1228925

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

From Raphaël Beamonte <raphael.beamonte@gmail.com>
Newsgroups linux.kernel
Subject [PATCHv3 03/15] staging: rtl8192u: r8192U_core: reverse conditions to get lines under 80 characters
Date 2015-09-20 19:30 +0200
Message-ID <qaQB6-6qO-37@gated-at.bofh.it> (permalink)
References <qaQrn-6fo-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCHv2 00/16] staging: rtl8192u: code clean up Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 01/16] staging: rtl8192u: r8192U_core: fix comments lines over 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 10/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: remove unneeded variable Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 11/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable rfpath to rfp Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 15/16] staging: rtl8192u: r8192U_core: replace else { if() {} } by else if () {} Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 07/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable pprevious_stats to prev_stats Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 06/16] staging: rtl8192u: r8192U_core: rtl8192_read_eeprom_info: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 13/16] staging: rtl8192u: r8192U_core: rtl8192_tx: replace some inline conditions Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary variables to keep lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
    Re: [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-17 07:00 +0200
      Re: [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-17 07:10 +0200
        Re: [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-17 07:20 +0200
          Re: [PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-17 20:30 +0200
  [PATCHv2 12/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 08/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_index to sb_index Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 05/16] staging: rtl8192u: r8192U_core: rtl8192_adapter_start: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  [PATCHv2 04/16] staging: rtl8192u: r8192U_core: reverse conditions to get lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-11 09:40 +0200
  Re: [PATCHv2 02/16] staging: rtl8192u: r8192U_core: add line breaks  to keep lines under 80 characters Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-17 07:00 +0200
  [PATCHv3 00/15] staging: rtl8192u: code clean up Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 11/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 06/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable pprevious_stats to prev_stats Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 04/15] staging: rtl8192u: r8192U_core: rtl8192_adapter_start: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 13/15] staging: rtl8192u: r8192U_core: rtl8192_ioctl: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 05/15] staging: rtl8192u: r8192U_core: rtl8192_read_eeprom_info: reorganize function Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 10/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable rfpath to rfp Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 07/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_index to sb_index Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 14/15] staging: rtl8192u: r8192U_core: replace else { if() {} } by else if () {} Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 15/15] staging: rtl8192u: remove all code framed by symbol TO_DO_LIST Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:20 +0200
    [PATCHv3 09/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: remove unneeded variable Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:30 +0200
    [PATCHv3 08/15] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_statistics to sb_stats Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:30 +0200
    [PATCHv3 02/15] staging: rtl8192u: r8192U_core: add temporary variables to keep lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:30 +0200
      Re: [PATCHv3 02/15] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-09-21 06:40 +0200
        Re: [PATCHv3 02/15] staging: rtl8192u: r8192U_core: add temporary  variables to keep lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-21 18:40 +0200
    [PATCHv3 03/15] staging: rtl8192u: r8192U_core: reverse conditions to get lines under 80 characters Raphaël Beamonte <raphael.beamonte@gmail.com> - 2015-09-20 19:30 +0200

csiph-web