netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2 v2] tc: fix warning in tc/q_pie.c
@ 2019-12-04 21:32 Brian Vazquez
  2019-12-05 20:24 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Vazquez @ 2019-12-04 21:32 UTC (permalink / raw)
  To: Brian Vazquez, David Ahern, Stephen Hemminger
  Cc: Mahesh Bandewar, Maciej Zenczykowski, netdev, Brian Vazquez,
	Leslie Monis

Warning was:
q_pie.c:202:22: error: implicit conversion from 'unsigned long' to
'double'

Fixes: 492ec9558b30 ("tc: pie: change maximum integer value of tc_pie_xstats->prob")
Cc: Leslie Monis <lesliemonis@gmail.com>
Signed-off-by: Brian Vazquez <brianvv@google.com>
---
 v2: rebase to current version.

 tc/q_pie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tc/q_pie.c b/tc/q_pie.c
index 935548a2..fda98a71 100644
--- a/tc/q_pie.c
+++ b/tc/q_pie.c
@@ -217,7 +217,7 @@ static int pie_print_xstats(struct qdisc_util *qu, FILE *f,
 	st = RTA_DATA(xstats);
 	/*prob is returned as a fracion of maximum integer value */
 	fprintf(f, "prob %f delay %uus",
-		(double)st->prob / UINT64_MAX, st->delay);
+		(double)st->prob / (double)UINT64_MAX, st->delay);
 
 	if (st->dq_rate_estimating)
 		fprintf(f, " avg_dq_rate %u\n", st->avg_dq_rate);
-- 
2.24.0.393.g34dc348eaf-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH iproute2 v2] tc: fix warning in tc/q_pie.c
  2019-12-04 21:32 [PATCH iproute2 v2] tc: fix warning in tc/q_pie.c Brian Vazquez
@ 2019-12-05 20:24 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2019-12-05 20:24 UTC (permalink / raw)
  To: Brian Vazquez
  Cc: Brian Vazquez, David Ahern, Mahesh Bandewar, Maciej Zenczykowski,
	netdev, Leslie Monis

On Wed,  4 Dec 2019 13:32:03 -0800
Brian Vazquez <brianvv@google.com> wrote:

> Warning was:
> q_pie.c:202:22: error: implicit conversion from 'unsigned long' to
> 'double'
> 
> Fixes: 492ec9558b30 ("tc: pie: change maximum integer value of tc_pie_xstats->prob")
> Cc: Leslie Monis <lesliemonis@gmail.com>
> Signed-off-by: Brian Vazquez <brianvv@google.com>
> ---

Applied

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-05 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-04 21:32 [PATCH iproute2 v2] tc: fix warning in tc/q_pie.c Brian Vazquez
2019-12-05 20:24 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).