Attention is currently required from: laforge, neels, pespin.
dexter 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 5:
(1 comment)
File src/codec/ecu_fr.c:
https://gerrit.osmocom.org/c/libosmocore/+/35212/comment/5c265b1f_519cd1ac
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 a […]
As it seems I am having
difficulties to understand your idea. I do not understand how container_of/offsetof can be
used to find a simpler/safer solution.
I could think of using offsetof on data[] to get its offset and then use that offset to
calculate the next aligned address to place the private struct there.
It would be great if you could point me to an example.
--
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: 5
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 14 Dec 2023 09:02:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment