<p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972">View Change</a></p><p>8 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/include/osmocom/bsc/gsm_data.h">File include/osmocom/bsc/gsm_data.h:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/include/osmocom/bsc/gsm_data.h@1439">Patch Set #1, Line 1439:</a> <code style="font-family:monospace,monospace">     CHAN_COUNTS2_N</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">is this simply to flag the end? please document so, since it's a bit confusing as this is an enum enumerating types of counting ;)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/include/osmocom/bsc/gsm_data.h@1442">Patch Set #1, Line 1442:</a> <code style="font-family:monospace,monospace">extern const struct value_string chan_count2_strs[];</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Lots of new infra, sounds like all this can be moved to a new header file.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/src/osmo-bsc/abis_rsl.c">File src/osmo-bsc/abis_rsl.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/src/osmo-bsc/abis_rsl.c@1961">Patch Set #1, Line 1961:</a> <code style="font-family:monospace,monospace">        chan_counts_t bts_counts;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">we don't tend to use *_t types in osmocom (see kernel programming style guide). If it's a struct, describe it as a struct.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/src/osmo-bsc/abis_rsl.c@1974">Patch Set #1, Line 1974:</a> <code style="font-family:monospace,monospace">     free_tchf = bts_counts[CHAN_COUNTS1_ALL][CHAN_COUNTS2_FREE][GSM_LCHAN_TCH_F];</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I'd rather prefer getters here, this way the array can be kept internal to its own module and no need for other modules to know how counting ocurrs.<br>Moreover, some comment here describing what you fetch here with all those enums is welcome.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/src/osmo-bsc/bts.c">File src/osmo-bsc/bts.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/src/osmo-bsc/bts.c@728">Patch Set #1, Line 728:</a> <code style="font-family:monospace,monospace">                chan_counts_t trx_counts;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">same, no *_t types, only for basic type typedefs.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/src/osmo-bsc/bts_trx.c">File src/osmo-bsc/bts_trx.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/src/osmo-bsc/bts_trx.c@327">Patch Set #1, Line 327:</a> <code style="font-family:monospace,monospace">void trx_count_lchans(chan_counts_t ret, const struct gsm_bts_trx *trx)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">All this could go into a new counts.c file, to have all this logic in one place. Alternatively, pass trx as first param as in object-oriented, since also the function starts with trx_*</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/src/osmo-bsc/gsm_data.c">File src/osmo-bsc/gsm_data.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/src/osmo-bsc/gsm_data.c@650">Patch Set #1, Line 650:</a> <code style="font-family:monospace,monospace"> * TODO: include possible VAMOS secondary lchans? */</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">what about this TODO?</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/src/osmo-bsc/handover_decision_2.c">File src/osmo-bsc/handover_decision_2.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972/1/src/osmo-bsc/handover_decision_2.c@997">Patch Set #1, Line 997:</a> <code style="font-family:monospace,monospace"> c->current.free_tchf = bts_counts[CHAN_COUNTS1_ALL][CHAN_COUNTS2_FREE][GSM_LCHAN_TCH_F];</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">same, use getters (be it static inline or whatever)</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972">change 25972</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2fb48c549186db812b1e9d6b735a92e80f27b8d3 </div>
<div style="display:none"> Gerrit-Change-Number: 25972 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 27 Oct 2021 12:39:10 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>