tmv: Add missing uses of tmv_to_nanoseconds()

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
master
Michael Brown 2018-03-01 18:12:23 +00:00 committed by Richard Cochran
parent 12c9805eab
commit ea82ae6c28
2 changed files with 7 additions and 5 deletions

View File

@ -407,7 +407,7 @@ static int clock_management_fill_response(struct clock *c, struct port *p,
break; break;
case TLV_TIME_STATUS_NP: case TLV_TIME_STATUS_NP:
tsn = (struct time_status_np *) tlv->data; tsn = (struct time_status_np *) tlv->data;
tsn->master_offset = c->master_offset; tsn->master_offset = tmv_to_nanoseconds(c->master_offset);
tsn->ingress_time = tmv_to_nanoseconds(c->ingress_ts); tsn->ingress_time = tmv_to_nanoseconds(c->ingress_ts);
tsn->cumulativeScaledRateOffset = tsn->cumulativeScaledRateOffset =
(Integer32) (c->status.cumulativeScaledRateOffset + (Integer32) (c->status.cumulativeScaledRateOffset +

View File

@ -134,10 +134,11 @@ tmv_t get_raw_delay(struct tsproc *tsp)
delay = tmv_div(tmv_add(t23, t41), 2); delay = tmv_div(tmv_add(t23, t41), 2);
if (delay < 0) { if (delay < 0) {
pr_debug("negative delay %10" PRId64, delay); pr_debug("negative delay %10" PRId64,
tmv_to_nanoseconds(delay));
pr_debug("delay = (t2 - t3) * rr + (t4 - t1)"); pr_debug("delay = (t2 - t3) * rr + (t4 - t1)");
pr_debug("t2 - t3 = %+10" PRId64, t23); pr_debug("t2 - t3 = %+10" PRId64, tmv_to_nanoseconds(t23));
pr_debug("t4 - t1 = %+10" PRId64, t41); pr_debug("t4 - t1 = %+10" PRId64, tmv_to_nanoseconds(t41));
pr_debug("rr = %.9f", tsp->clock_rate_ratio); pr_debug("rr = %.9f", tsp->clock_rate_ratio);
} }
@ -156,7 +157,8 @@ int tsproc_update_delay(struct tsproc *tsp, tmv_t *delay)
tsp->filtered_delay_valid = 1; tsp->filtered_delay_valid = 1;
pr_debug("delay filtered %10" PRId64 " raw %10" PRId64, pr_debug("delay filtered %10" PRId64 " raw %10" PRId64,
tsp->filtered_delay, raw_delay); tmv_to_nanoseconds(tsp->filtered_delay),
tmv_to_nanoseconds(raw_delay));
if (!delay) { if (!delay) {
return 0; return 0;