Change in osmocom-bb[master]: fix time delta calculations in sched_clck.c

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Aug 17 13:06:17 UTC 2018


Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/10489 )

Change subject: fix time delta calculations in sched_clck.c
......................................................................


Patch Set 1: Code-Review-1

(6 comments)

https://gerrit.osmocom.org/#/c/10489/1/src/host/trxcon/sched_clck.c
File src/host/trxcon/sched_clck.c:

https://gerrit.osmocom.org/#/c/10489/1/src/host/trxcon/sched_clck.c@75
PS1, Line 75: 			"elapsed uS %" PRIu64 "\n", elapsed_us);
Better cast "(uint64_t) elapsed_us", iirc I saw sometimes compilers printing warnings checking the printf format vs types passed as arguments.


https://gerrit.osmocom.org/#/c/10489/1/src/host/trxcon/sched_clck.c@85
PS1, Line 85: 		timespecadd(tv_clock, &frame_duration, &next);
No need to use next here, you can do: timespecadd(tv_clock, &frame_duration, tv_clock);


https://gerrit.osmocom.org/#/c/10489/1/src/host/trxcon/sched_clck.c@86
PS1, Line 86: 		*tv_clock = next;
As a result this line can be dropped, as well as the declaration of the var.


https://gerrit.osmocom.org/#/c/10489/1/src/host/trxcon/sched_clck.c@98
PS1, Line 98: 		FRAME_DURATION_uS - elapsed_us);
Not related to this changeset, but wondering if this value makes sense?


https://gerrit.osmocom.org/#/c/10489/1/src/host/trxcon/sched_clck.c@163
PS1, Line 163: 	LOGP(DSCH, LOGL_INFO, "GSM clock jitter: %" PRIu64 "\n",
That should be PRId64, it can be negative.


https://gerrit.osmocom.org/#/c/10489/1/src/host/trxcon/sched_clck.c@175
PS1, Line 175: 		timespecadd(&tv_now, &duration, &next);
timespecadd(&tv_now, &duration, &tv_clock);

then you can drop next and line below this one.



-- 
To view, visit https://gerrit.osmocom.org/10489
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic93f90685c6d6dc28dfc4ad48c998e0eac113cf8
Gerrit-Change-Number: 10489
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Comment-Date: Fri, 17 Aug 2018 13:06:17 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180817/e9aaee08/attachment.htm>


More information about the gerrit-log mailing list