Attention is currently required from: dexter, laforge, neels.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email )

Change subject: ecu: force alignment of member data in struct osmo_ecu_state
......................................................................


Patch Set 4: Code-Review+1

(3 comments)

Patchset:

PS4:
I don't see any good reason not to use container_of here instead of casting.


File src/codec/ecu_fr.c:

https://gerrit.osmocom.org/c/libosmocore/+/35212/comment/18f6223c_7d3d57c8
PS4, Line 92:   struct osmo_ecu_state ecu_state;
Add a comment that ecu_state should be the first in the struct.

If you used container_of, this wouldn't be required.


https://gerrit.osmocom.org/c/libosmocore/+/35212/comment/6e097f90_5147b26e
PS4, Line 294:  return (struct osmo_ecu_state*) fr;
while the cast is fine, the container_of would probably be safer and would 
allow this struct to be anywhere, with no real cost (a few arithmetic 
operations).



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I28672856e8e8f47e04ffe09ee3e07b577108cdc7
Gerrit-Change-Number: 35212
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pma...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: neels <nhofm...@sysmocom.de>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-Attention: neels <nhofm...@sysmocom.de>
Gerrit-Attention: laforge <lafo...@osmocom.org>
Gerrit-Attention: dexter <pma...@sysmocom.de>
Gerrit-Comment-Date: Wed, 13 Dec 2023 13:53:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Reply via email to