提交 72e2fe38 编写于 作者: S Steven Rostedt (Red Hat) 提交者: Steven Rostedt

tracing: Convert stddev into u64 in tracepoint benchmark

I've been told that do_div() expects an unsigned 64 bit number, and
is undefined if a signed is used. This gave a warning on the MIPS
build. I'm not sure if a signed 64 bit dividend is really an issue
or not, but the calculation this is used for is standard deviation,
and that isn't going to be negative. We can just convert it to
unsigned and be safe.
Reported-by: NDavid Daney <ddaney.cavm@gmail.com>
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 939c7a4f
......@@ -33,7 +33,7 @@ static void trace_do_benchmark(void)
u64 start;
u64 stop;
u64 delta;
s64 stddev;
u64 stddev;
u64 seed;
u64 last_seed;
unsigned int avg;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册