<p style="white-space: pre-wrap; word-wrap: break-word;">Shifted things around a bit and fixed a few patch errors (unrelated changes that shouldn't have been in the patch).</p><p style="white-space: pre-wrap; word-wrap: break-word;">Using a typedef to fixate the array dimensions is still my favorite solution.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I wouldn't generally allow typedefs, so in this case i would delete the linter -1, instead of disabling the linter test.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25972">View Change</a></p><p>2 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@1448">Patch Set #1, Line 1448:</a> <code style="font-family:monospace,monospace">typedef unsigned int chan_counts_t [CHAN_COUNTS1_N][CHAN_COUNTS2_N][_GSM_LCHAN_MAX];</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I'd go for the struct with the multidimensional array inside it. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">it'll be quite a bit of effort to change this.<br>With array-in-a-struct there's still the problem with functions working on only the third or second dimension. With a struct, how would you solve chan_counts_dim3_add()?</p><p style="white-space: pre-wrap; word-wrap: break-word;">I find that moving to a struct makes things more complex,<br>and it seems there is no benefit besides personal preference?</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@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><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Yes please, a getter like you wrote, and with some minimal description like "Remember to call bts_co […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">i don't see the point for such a getter function. it makes for literally the same code except punctuation and braces.</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: 2 </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-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 01 Nov 2021 11:26:24 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>