Attention is currently required from: laforge, fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/28744 )
Change subject: trxcon: make l1sched logging configurable, use trxcon->fi as prefix ......................................................................
Patch Set 3:
(1 comment)
File src/host/trxcon/src/sched_trx.c:
https://gerrit.osmocom.org/c/osmocom-bb/+/28744/comment/88f7aa43_2a2e35af PS3, Line 167: .cfg = *cfg,
The lifetime of trxcon_inst is limited by the lifetime of l1sched_state, they cannot exist independe […]
I don't see this struct l1sched_state knows anything about such a "trxcon_inst" you mention here, so you are simply adding some phantom requirement here regarding some unknown object to be alive the same timespan as this one. That's really bad design imho and makes it really confusing.
You either: - pass ownership of the str pointer to this object (bad because you don't really know whether it was allocated by the caller using the heap or the stack). - Copy the log prefix into a new string owned by this object (good way imho).