From ea82ae6c284f2aa7848029958768e694cdefe8d4 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 1 Mar 2018 18:12:23 +0000 Subject: [PATCH] tmv: Add missing uses of tmv_to_nanoseconds() Signed-off-by: Michael Brown --- clock.c | 2 +- tsproc.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/clock.c b/clock.c index c88504b..7acb18e 100644 --- a/clock.c +++ b/clock.c @@ -407,7 +407,7 @@ static int clock_management_fill_response(struct clock *c, struct port *p, break; case TLV_TIME_STATUS_NP: 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->cumulativeScaledRateOffset = (Integer32) (c->status.cumulativeScaledRateOffset + diff --git a/tsproc.c b/tsproc.c index b50c8e5..91bae37 100644 --- a/tsproc.c +++ b/tsproc.c @@ -134,10 +134,11 @@ tmv_t get_raw_delay(struct tsproc *tsp) delay = tmv_div(tmv_add(t23, t41), 2); 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("t2 - t3 = %+10" PRId64, t23); - pr_debug("t4 - t1 = %+10" PRId64, t41); + pr_debug("t2 - t3 = %+10" PRId64, tmv_to_nanoseconds(t23)); + pr_debug("t4 - t1 = %+10" PRId64, tmv_to_nanoseconds(t41)); 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; 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) { return 0;