<p>Patch set 2:<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/11787">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/11787/2/include/osmocom/gprs/protocol/gsm_04_60.h">File include/osmocom/gprs/protocol/gsm_04_60.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/11787/2/include/osmocom/gprs/protocol/gsm_04_60.h@33">Patch Set #2, Line 33:</a> <code style="font-family:monospace,monospace">       uint8_t tfi_hi:2, cv:4, si:1, r:1;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Please change the script to add lines/formatting like in the little endian case.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/11787/2/include/osmocom/gsm/protocol/gsm_03_41.h">File include/osmocom/gsm/protocol/gsm_03_41.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/11787/2/include/osmocom/gsm/protocol/gsm_03_41.h@36">Patch Set #2, Line 36:</a> <code style="font-family:monospace,monospace">          uint8_t language:4;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Be careful here!!<br>Big endian generated code is not the same as in little endian.</p><p style="white-space: pre-wrap; word-wrap: break-word;">In little endian you are saying: I have 2 bytes, and for each I only care about the lower 4 bits (so it should never handle values greater than 16).</p><p style="white-space: pre-wrap; word-wrap: break-word;">In the big endian you are saying: I have 1 byte, and 4 lower bits are repreented by one variable, and the 4 higher bits by the other variable.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So I see 2 possible issues here:</p><ul><li>original little endian strucut looks suspicously wrong. Probably we want 1 byte with 2 variables instead of 2 bytes with 2 variables. We need to check that in specs.</li><li>Regardless of that, the script checking for endianess should take care of this case, since it's valid in general and used in some cases.</li></ul></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/11787">change 11787</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/11787"/><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: Ia0b99d76932aeb03e93bd0c62d3bf025dec5f9d2 </div>
<div style="display:none"> Gerrit-Change-Number: 11787 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </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-Comment-Date: Fri, 16 Nov 2018 10:49:20 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>