@@ -518,9 +518,9 @@ static void tst_fzsync_pair_update(struct tst_fzsync_pair *pair)
tst_res(TINFO,
"Reached deviation ratios < %.2f, introducing randomness",
pair->max_dev_ratio);
- tst_res(TINFO, "Delay range is [-%d, %d]",
- (int)(pair->diff_sb.avg / per_spin_time) + pair->delay_bias,
- (int)(pair->diff_sa.avg / per_spin_time) - pair->delay_bias);
+ tst_res(TINFO, "Delay range is [%d, %d]",
+ -(int)(pair->diff_sb.avg / per_spin_time) + pair->delay_bias,
+ (int)(pair->diff_sa.avg / per_spin_time) + pair->delay_bias);
tst_fzsync_pair_info(pair);
pair->sampling = -1;
}
If the magnitude of delay_bias is large enough then it can turn the lower bound positive. Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com> --- include/tst_fuzzy_sync.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)