Commit 3853c0bb authored by Philippe Gerum's avatar Philippe Gerum
Browse files

drivers/evl: fix signedness when summing latency values

We may collect negative delta values when sampling latency on fast
machines, make sure the delta sum which is used in calculating the
average is signed, to prevent weird results.
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <>
parent c48dcc5d
......@@ -49,7 +49,7 @@ struct runner_state {
int prev_mean;
int prev_sqs;
int cur_sqs;
unsigned int sum;
int sum;
unsigned int overruns;
unsigned int cur_samples;
unsigned int max_samples;
......@@ -608,7 +608,7 @@ static void dump_scores(struct latmus_runner *runner)
for (n = 0; n < runner->nscores; n++)
".. S%.2d pmean=%d stddev=%u minlat=%u gravity=%u\n",
".. S%.2d pmean=%d stddev=%d minlat=%d gravity=%u\n",
......@@ -39,7 +39,7 @@ struct latmus_result {
* second through an xbuf channel.
struct latmus_measurement {
__u64 sum_lat;
__s64 sum_lat;
__s32 min_lat;
__s32 max_lat;
__u32 overruns;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment