<p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/18903">View Change</a></p><p>6 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/18903/3/include/osmo-bts/bts_shutdown_fsm.h">File include/osmo-bts/bts_shutdown_fsm.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-bts/+/18903/3/include/osmo-bts/bts_shutdown_fsm.h@40">Patch Set #3, Line 40:</a> <code style="font-family:monospace,monospace">struct gsm_bts;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">weird to declare an opaque struct without any API in this header requiring it</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/18903/3/src/common/bts_shutdown_fsm.c">File src/common/bts_shutdown_fsm.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-bts/+/18903/3/src/common/bts_shutdown_fsm.c@34">Patch Set #3, Line 34:</a> <code style="font-family:monospace,monospace">   [BTS_SHUTDOWN_ST_NONE] = { },</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">(you can just omit states that need no T set, it will be zero initialized implicitly)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/18903/3/src/common/bts_shutdown_fsm.c@40">Patch Set #3, Line 40:</a> <code style="font-family:monospace,monospace">((struct gsm_bts *)fi->priv)->T_defs</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">(since there is only one global struct gsm_bts, the T_defs could also be just a global pointer)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/18903/3/src/common/bts_shutdown_fsm.c@89">Patch Set #3, Line 89:</a> <code style="font-family:monospace,monospace">         .name = "WaitRampDownComplete",</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">(my personal humble opinion is that I want to be able to directly grep the src by state names seen in the logs, here "WAIT_RAMP_DOWN_COMPL" would allow that)</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bts/+/18903/3/src/common/gsm_data.c">File src/common/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-bts/+/18903/3/src/common/gsm_data.c@43">Patch Set #3, Line 43:</a> <code style="font-family:monospace,monospace">   { .T=-1, .default_val=1, .desc="Grace time for ramp down complete during shutdown (s)" },</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">It could be good to de-collision with other T used in various osmo programs, see http://osmocom.org/issues/4539 .<br>osmo-bsc and osmo-msc already both use -1 and -2.<br>We haven't really discussed a scheme on those timer numbers yet, but still maybe better not add more "collisions" for the time being?</p><p style="white-space: pre-wrap; word-wrap: break-word;">rgrep 'T=-'</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bts/+/18903/3/src/common/gsm_data.c@295">Patch Set #3, Line 295:</a> <code style="font-family:monospace,monospace">                                         LOGL_INFO, bts_name);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">(possible without a char buffer:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  osmo_fsm_inst_alloc(..., id=NULL);<br>  osmo_fsm_inst_update_id_f(fi, "bts%d", bts->nr);</pre><p style="white-space: pre-wrap; word-wrap: break-word;">hold on, there is only one BTS in osmo-bts ... why even add the number?<br>)</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bts/+/18903">change 18903</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-bts/+/18903"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I8f48f17e61c3b9b86342eaf5b8a2b1ac9758bde5 </div>
<div style="display:none"> Gerrit-Change-Number: 18903 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 22 Jun 2020 17:40:22 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>