Change in osmo-bts[master]: [VAMOS] common: make 'struct gsm_bts_trx_ts' pointers const

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/.

laforge gerrit-no-reply at lists.osmocom.org
Sun May 23 10:09:27 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/24336 )

Change subject: [VAMOS] common: make 'struct gsm_bts_trx_ts' pointers const
......................................................................

[VAMOS] common: make 'struct gsm_bts_trx_ts' pointers const

Change-Id: I0369ef4ae603a4afed0661a5894df6a7135b1919
---
M include/osmo-bts/gsm_data.h
M src/common/gsm_data.c
2 files changed, 7 insertions(+), 7 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index be18007..50ee88e 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -526,9 +526,9 @@
 struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr,
 				   int *rc);
 
-enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts);
-uint8_t ts_subslots(struct gsm_bts_trx_ts *ts);
-bool ts_is_tch(struct gsm_bts_trx_ts *ts);
+enum gsm_phys_chan_config ts_pchan(const struct gsm_bts_trx_ts *ts);
+uint8_t ts_subslots(const struct gsm_bts_trx_ts *ts);
+bool ts_is_tch(const struct gsm_bts_trx_ts *ts);
 
 int lchan2ecu_codec(const struct gsm_lchan *lchan);
 
diff --git a/src/common/gsm_data.c b/src/common/gsm_data.c
index 7cf48bf..f109722 100644
--- a/src/common/gsm_data.c
+++ b/src/common/gsm_data.c
@@ -352,7 +352,7 @@
 };
 
 /*! Return the actual pchan type, also heeding dynamic TS. */
-enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts)
+enum gsm_phys_chan_config ts_pchan(const struct gsm_bts_trx_ts *ts)
 {
 	switch (ts->pchan) {
 	case GSM_PCHAN_TCH_F_TCH_H_PDCH:
@@ -369,7 +369,7 @@
 
 /*! According to ts->pchan and possibly ts->dyn_pchan, return the number of
  * logical channels available in the timeslot. */
-uint8_t ts_subslots(struct gsm_bts_trx_ts *ts)
+uint8_t ts_subslots(const struct gsm_bts_trx_ts *ts)
 {
 	return subslots_per_pchan[ts_pchan(ts)];
 }
@@ -385,7 +385,7 @@
 	}
 }
 
-bool ts_is_tch(struct gsm_bts_trx_ts *ts)
+bool ts_is_tch(const struct gsm_bts_trx_ts *ts)
 {
 	return pchan_is_tch(ts_pchan(ts));
 }
@@ -403,7 +403,7 @@
 /* determine the ECU codec constant for the codec used by given lchan */
 int lchan2ecu_codec(const struct gsm_lchan *lchan)
 {
-	struct gsm_bts_trx_ts *ts = lchan->ts;
+	const struct gsm_bts_trx_ts *ts = lchan->ts;
 
 	switch (lchan->tch_mode) {
 	case GSM48_CMODE_SPEECH_V1:

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I0369ef4ae603a4afed0661a5894df6a7135b1919
Gerrit-Change-Number: 24336
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210523/ea468452/attachment.htm>


More information about the gerrit-log mailing list