Change in osmo-pcu[master]: cosmetic: use const pointer for bts_data
Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12246 ) Change subject: cosmetic: use const pointer for bts_data .. cosmetic: use const pointer for bts_data It's used several time for logging so let's call it once to make code easier to follow. Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b --- M src/tbf_dl.cpp M src/tbf_ul.cpp 2 files changed, 7 insertions(+), 4 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index c97436a..d5e4a45 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -1350,9 +1350,11 @@ void gprs_rlcmac_dl_tbf::set_window_size() { - uint16_t ws = egprs_window_size(bts->bts_data(), dl_slots()); + const struct gprs_rlcmac_bts *b = bts->bts_data(); + uint16_t ws = egprs_window_size(b, dl_slots()); + LOGPTBFDL(this, LOGL_INFO, "setting EGPRS DL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n", - ws, bts->bts_data()->ws_base, pcu_bitcount(dl_slots()), bts->bts_data()->ws_pdch); + ws, b->ws_base, pcu_bitcount(dl_slots()), b->ws_pdch); m_window.set_ws(ws); } diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index fd7d73b..e1a0fbd 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -588,8 +588,9 @@ void gprs_rlcmac_ul_tbf::set_window_size() { - uint16_t ws = egprs_window_size(bts->bts_data(), ul_slots()); + const struct gprs_rlcmac_bts *b = bts->bts_data(); + uint16_t ws = egprs_window_size(b, ul_slots()); LOGPTBFUL(this, LOGL_INFO, "setting EGPRS UL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n", - ws, bts->bts_data()->ws_base, pcu_bitcount(ul_slots()), bts->bts_data()->ws_pdch); + ws, b->ws_base, pcu_bitcount(ul_slots()), b->ws_pdch); m_window.set_ws(ws); } -- To view, visit https://gerrit.osmocom.org/12246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b Gerrit-Change-Number: 12246 Gerrit-PatchSet: 4 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith
Change in osmo-pcu[master]: cosmetic: use const pointer for bts_data
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/12246 ) Change subject: cosmetic: use const pointer for bts_data .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b Gerrit-Change-Number: 12246 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 08 Apr 2019 07:36:10 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-pcu[master]: cosmetic: use const pointer for bts_data
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/12246 ) Change subject: cosmetic: use const pointer for bts_data .. Patch Set 3: (1 comment) https://gerrit.osmocom.org/#/c/12246/3/src/tbf_ul.cpp File src/tbf_ul.cpp: https://gerrit.osmocom.org/#/c/12246/3/src/tbf_ul.cpp@598 PS3, Line 598: LOGPTBFUL(this, LOGL_INFO, "setting EGPRS UL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n", Add empty line here please -- To view, visit https://gerrit.osmocom.org/12246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b Gerrit-Change-Number: 12246 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 26 Mar 2019 18:36:37 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-pcu[master]: cosmetic: use const pointer for bts_data
Max has posted comments on this change. ( https://gerrit.osmocom.org/12246 ) Change subject: cosmetic: use const pointer for bts_data .. Patch Set 3: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/12246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b Gerrit-Change-Number: 12246 Gerrit-PatchSet: 3 Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 26 Mar 2019 13:37:16 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in osmo-pcu[master]: cosmetic: use const pointer for bts_data
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12246 Change subject: cosmetic: use const pointer for bts_data .. cosmetic: use const pointer for bts_data It's used several time for logging so let's call it once to make code easier to follow. Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b --- M src/tbf_dl.cpp M src/tbf_ul.cpp 2 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/46/12246/1 diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index dd24963..01331a6 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -1357,9 +1357,10 @@ void gprs_rlcmac_dl_tbf::set_window_size() { - uint16_t ws = egprs_window_size(bts->bts_data(), dl_slots()); + const struct gprs_rlcmac_bts *b = bts->bts_data(); + uint16_t ws = egprs_window_size(b, dl_slots()); LOGPTBFDL(this, LOGL_INFO, "setting EGPRS DL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n", - ws, bts->bts_data()->ws_base, pcu_bitcount(dl_slots()), bts->bts_data()->ws_pdch); + ws, b->ws_base, pcu_bitcount(dl_slots()), b->ws_pdch); m_window.set_ws(ws); } diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 02f4ddb..f877484 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -593,8 +593,9 @@ void gprs_rlcmac_ul_tbf::set_window_size() { - uint16_t ws = egprs_window_size(bts->bts_data(), ul_slots()); + const struct gprs_rlcmac_bts *b = bts->bts_data(); + uint16_t ws = egprs_window_size(b, ul_slots()); LOGPTBFUL(this, LOGL_INFO, "setting EGPRS UL window size to %u, base(%u) slots(%u) ws_pdch(%u)\n", - ws, bts->bts_data()->ws_base, pcu_bitcount(ul_slots()), bts->bts_data()->ws_pdch); + ws, b->ws_base, pcu_bitcount(ul_slots()), b->ws_pdch); m_window.set_ws(ws); } -- To view, visit https://gerrit.osmocom.org/12246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icfd9e5603a5d8701f487f17e9c0335d458e9e80b Gerrit-Change-Number: 12246 Gerrit-PatchSet: 1 Gerrit-Owner: Max