[MERGED] libosmocore[master]: gsm0503_coding: Mark gsm0503_mcs_{ul, dl}_codes as const

2017-06-12 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: gsm0503_coding: Mark gsm0503_mcs_{ul,dl}_codes as const
..


gsm0503_coding: Mark gsm0503_mcs_{ul,dl}_codes as const

The table describing the various MCS convolutional codes are constant
data and should be marked as such.

Change-Id: I4918521ee4572a67cbee5f9b49257fc5bfcde511
---
M src/coding/gsm0503_coding.c
1 file changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index bf4df1c..7039863 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -186,7 +186,7 @@
 /*
  * EGPRS UL coding parameters
  */
-struct gsm0503_mcs_code gsm0503_mcs_ul_codes[EGPRS_NUM_MCS] = {
+const struct gsm0503_mcs_code gsm0503_mcs_ul_codes[EGPRS_NUM_MCS] = {
{
.mcs = EGPRS_MCS0,
},
@@ -357,7 +357,7 @@
 /*
  * EGPRS DL coding parameters
  */
-struct gsm0503_mcs_code gsm0503_mcs_dl_codes[EGPRS_NUM_MCS] = {
+const struct gsm0503_mcs_code gsm0503_mcs_dl_codes[EGPRS_NUM_MCS] = {
{
.mcs = EGPRS_MCS0,
},
@@ -743,7 +743,7 @@
sbit_t C[EGPRS_HDR_C_MAX];
ubit_t upp[EGPRS_HDR_UPP_MAX];
int i, j, rc;
-   struct gsm0503_mcs_code *code;
+   const struct gsm0503_mcs_code *code;
 
code = _mcs_ul_codes[mcs];
 
@@ -858,7 +858,7 @@
sbit_t C[EGPRS_DATA_C_MAX];
 
int i, j, rc, data_len;
-   struct gsm0503_mcs_code *code;
+   const struct gsm0503_mcs_code *code;
 
if (blk && mcs < EGPRS_MCS7) {
/* Invalid MCS-X block state */
@@ -1206,7 +1206,7 @@
 {
int i, j;
ubit_t upp[EGPRS_HDR_UPP_MAX], C[EGPRS_HDR_C_MAX];
-   struct gsm0503_mcs_code *code;
+   const struct gsm0503_mcs_code *code;
 
code = _mcs_dl_codes[mcs];
 
@@ -1241,7 +1241,7 @@
 {
int i, j, data_len;
ubit_t u[EGPRS_DATA_U_MAX], C[EGPRS_DATA_C_MAX];
-   struct gsm0503_mcs_code *code;
+   const struct gsm0503_mcs_code *code;
 
code = _mcs_dl_codes[mcs];
 

-- 
To view, visit https://gerrit.osmocom.org/2890
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4918521ee4572a67cbee5f9b49257fc5bfcde511
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


libosmocore[master]: gsm0503_coding: Mark gsm0503_mcs_{ul, dl}_codes as const

2017-06-12 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/2890
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4918521ee4572a67cbee5f9b49257fc5bfcde511
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] libosmocore[master]: gsm0503_coding: Mark gsm0503_mcs_{ul, dl}_codes as const

2017-06-12 Thread Harald Welte

Review at  https://gerrit.osmocom.org/2890

gsm0503_coding: Mark gsm0503_mcs_{ul,dl}_codes as const

The table describing the various MCS convolutional codes are constant
data and should be marked as such.

Change-Id: I4918521ee4572a67cbee5f9b49257fc5bfcde511
---
M src/coding/gsm0503_coding.c
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/90/2890/1

diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index bf4df1c..7039863 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -186,7 +186,7 @@
 /*
  * EGPRS UL coding parameters
  */
-struct gsm0503_mcs_code gsm0503_mcs_ul_codes[EGPRS_NUM_MCS] = {
+const struct gsm0503_mcs_code gsm0503_mcs_ul_codes[EGPRS_NUM_MCS] = {
{
.mcs = EGPRS_MCS0,
},
@@ -357,7 +357,7 @@
 /*
  * EGPRS DL coding parameters
  */
-struct gsm0503_mcs_code gsm0503_mcs_dl_codes[EGPRS_NUM_MCS] = {
+const struct gsm0503_mcs_code gsm0503_mcs_dl_codes[EGPRS_NUM_MCS] = {
{
.mcs = EGPRS_MCS0,
},
@@ -743,7 +743,7 @@
sbit_t C[EGPRS_HDR_C_MAX];
ubit_t upp[EGPRS_HDR_UPP_MAX];
int i, j, rc;
-   struct gsm0503_mcs_code *code;
+   const struct gsm0503_mcs_code *code;
 
code = _mcs_ul_codes[mcs];
 
@@ -858,7 +858,7 @@
sbit_t C[EGPRS_DATA_C_MAX];
 
int i, j, rc, data_len;
-   struct gsm0503_mcs_code *code;
+   const struct gsm0503_mcs_code *code;
 
if (blk && mcs < EGPRS_MCS7) {
/* Invalid MCS-X block state */
@@ -1206,7 +1206,7 @@
 {
int i, j;
ubit_t upp[EGPRS_HDR_UPP_MAX], C[EGPRS_HDR_C_MAX];
-   struct gsm0503_mcs_code *code;
+   const struct gsm0503_mcs_code *code;
 
code = _mcs_dl_codes[mcs];
 
@@ -1241,7 +1241,7 @@
 {
int i, j, data_len;
ubit_t u[EGPRS_DATA_U_MAX], C[EGPRS_DATA_C_MAX];
-   struct gsm0503_mcs_code *code;
+   const struct gsm0503_mcs_code *code;
 
code = _mcs_dl_codes[mcs];
 

-- 
To view, visit https://gerrit.osmocom.org/2890
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4918521ee4572a67cbee5f9b49257fc5bfcde511
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte