Change in osmo-pcu[master]: cosmetic: Fix indentation of for loops

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Sep 22 16:04:03 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/20252 )


Change subject: cosmetic: Fix indentation of for loops
......................................................................

cosmetic: Fix indentation of for loops

Change-Id: Id7087bd00d9003235688ff34f2b039d525caa777
---
M src/gprs_rlcmac_ts_alloc.cpp
1 file changed, 48 insertions(+), 48 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/52/20252/1

diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index c4fbbad..836dab5 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -562,70 +562,70 @@
 
 		mslot_fill_rx_mask(mslot_class, num_tx, rx_mask);
 
-	/* Rotate group of TX slots: UUU-----, -UUU----, ..., UU-----U */
-	for (ul_ts = 0; ul_ts < 8; ul_ts += 1, tx_valid_win <<= 1) {
-		uint16_t rx_valid_win;
-		uint32_t checked_rx[256/32] = {0};
+		/* Rotate group of TX slots: UUU-----, -UUU----, ..., UU-----U */
+		for (ul_ts = 0; ul_ts < 8; ul_ts += 1, tx_valid_win <<= 1) {
+			uint16_t rx_valid_win;
+			uint32_t checked_rx[256/32] = {0};
 
-		/* Wrap valid window */
-		tx_valid_win = mslot_wrap_window(tx_valid_win);
+			/* Wrap valid window */
+			tx_valid_win = mslot_wrap_window(tx_valid_win);
 
-		tx_window = tx_valid_win;
+			tx_window = tx_valid_win;
 
-		/* Filter out unavailable slots */
-		tx_window &= *ul_slots;
+			/* Filter out unavailable slots */
+			tx_window &= *ul_slots;
 
-		/* Skip if the the first TS (ul_ts) is not in the set */
-		if ((tx_window & (1 << ul_ts)) == 0)
-			continue;
+			/* Skip if the the first TS (ul_ts) is not in the set */
+			if ((tx_window & (1 << ul_ts)) == 0)
+				continue;
 
-		/* Skip if the the last TS (ul_ts+num_tx-1) is not in the set */
-		if ((tx_window & (1 << ((ul_ts+num_tx-1) % 8))) == 0)
-			continue;
+			/* Skip if the the last TS (ul_ts+num_tx-1) is not in the set */
+			if ((tx_window & (1 << ((ul_ts+num_tx-1) % 8))) == 0)
+				continue;
 
-		rx_valid_win = (1 << OSMO_MIN(mslot_class_get_rx(mslot_class), Sum - num_tx)) - 1;
+			rx_valid_win = (1 << OSMO_MIN(mslot_class_get_rx(mslot_class), Sum - num_tx)) - 1;
 
-	/* Rotate group of RX slots: DDD-----, -DDD----, ..., DD-----D */
-	for (dl_ts = 0; dl_ts < 8; dl_ts += 1, rx_valid_win <<= 1) {
-		/* Wrap valid window */
-		rx_valid_win = (rx_valid_win | rx_valid_win >> 8) & 0xff;
+			/* Rotate group of RX slots: DDD-----, -DDD----, ..., DD-----D */
+			for (dl_ts = 0; dl_ts < 8; dl_ts += 1, rx_valid_win <<= 1) {
+				/* Wrap valid window */
+				rx_valid_win = (rx_valid_win | rx_valid_win >> 8) & 0xff;
 
-	/* Validate with both Tta/Ttb/Trb and Ttb/Tra/Trb */
-	for (mask_sel = MASK_TT; mask_sel <= MASK_TR; mask_sel += 1) {
-		int capacity;
+				/* Validate with both Tta/Ttb/Trb and Ttb/Tra/Trb */
+				for (mask_sel = MASK_TT; mask_sel <= MASK_TR; mask_sel += 1) {
+					int capacity;
 
-		rx_window = mslot_filter_bad(rx_mask[mask_sel], ul_ts, *dl_slots, rx_valid_win);
-		if (rx_window < 0)
-			continue;
+					rx_window = mslot_filter_bad(rx_mask[mask_sel], ul_ts, *dl_slots, rx_valid_win);
+					if (rx_window < 0)
+						continue;
 
-		if (skip_slot(mslot_class, mask_sel != MASK_TT, rx_window, tx_window, checked_rx))
- 			continue;
+					if (skip_slot(mslot_class, mask_sel != MASK_TT, rx_window, tx_window, checked_rx))
+						continue;
 
-		/* Compute capacity */
-		capacity = compute_capacity(trx, rx_window, tx_window);
+					/* Compute capacity */
+					capacity = compute_capacity(trx, rx_window, tx_window);
 
 #ifdef ENABLE_TS_ALLOC_DEBUG
-		LOGP(DRLCMAC, LOGL_DEBUG,
-			"- Considering DL/UL slots: (TS=0)\"%s\"(TS=7), "
-			"capacity = %d\n",
-			set_flag_chars(set_flag_chars(set_flag_chars(set_flag_chars(
-					slot_info,
-					rx_bad, 'x', '.'),
-					rx_window, 'D'),
-					tx_window, 'U'),
-					rx_window & tx_window, 'C'),
-			capacity);
+					LOGP(DRLCMAC, LOGL_DEBUG,
+						"- Considering DL/UL slots: (TS=0)\"%s\"(TS=7), "
+						"capacity = %d\n",
+						set_flag_chars(set_flag_chars(set_flag_chars(set_flag_chars(
+								slot_info,
+								rx_bad, 'x', '.'),
+								rx_window, 'D'),
+								tx_window, 'U'),
+								rx_window & tx_window, 'C'),
+						capacity);
 #endif
 
-		if (capacity <= max_capacity)
-			continue;
+					if (capacity <= max_capacity)
+						continue;
 
-		max_capacity = capacity;
-		max_ul_slots = tx_window;
-		max_dl_slots = rx_window;
-	}
-	}
-	}
+					max_capacity = capacity;
+					max_ul_slots = tx_window;
+					max_dl_slots = rx_window;
+				}
+			}
+		}
 	}
 
 	if (!max_ul_slots || !max_dl_slots) {

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/20252
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Id7087bd00d9003235688ff34f2b039d525caa777
Gerrit-Change-Number: 20252
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200922/ab685b51/attachment.htm>


More information about the gerrit-log mailing list