<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Hi,</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">I could change the commit to name the new API<br>"gsm_arfcn2band_validate", or actually use<br>"osmo_gsm_arfcn2band".</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">A possible way to go is to introduce the new osmo_gsm_arfcn2band(),<br>introduce GSM_BAND_INVAL = 0x00, and return GSM_BAND_INVAL for 'out<br>of band' values from there.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The old gsm_arfcn2band() could then just call osmo_gsm_arfcn2band(),<br>and replace GSM_BAND_INVAL by GSM_BAND_1800. And of course, it<br>would<br>be marked as deprecated. What do you think?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">No, I want old API (deprecated in this commit) to really stop returning wrong band from invalid arfcn, so we can really spot messy places (I did that, it was the way to find out some code using that function was wrong in osmo-bsc and doing unexpected stuff which was difficult to spot).</p><p style="white-space: pre-wrap; word-wrap: break-word;">And as discussed here and on IRC, I'm also reluctant to add a new GSM_BAND_INVAL value which is really only be used here, and then we need to adapt all switch cases to handle this case which actually should never happen with the new API (because it returns an error). Let's not add this kind of hacks like adding an enum value to indicate error and better decouple correct values and error codes when input of a function is wrong.</p><p><a href="https://gerrit.osmocom.org/11789">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/11789">change 11789</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/11789"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I780d452dcebce385469e32ef2fd844df6033393a </div>
<div style="display:none"> Gerrit-Change-Number: 11789 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-CC: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 19 Nov 2018 17:22:05 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: No </div>