Skip to content

Commit

Permalink
rhashtable-test: Fix 64bit division
Browse files Browse the repository at this point in the history
A 64bit division went in unnoticed. Use do_div() to accomodate
non 64bit architectures.

Reported-by: kbuild test robot
Fixes: 1aa661f ("rhashtable-test: Measure time to insert, remove & traverse entries")
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Thomas Graf authored and David S. Miller committed May 5, 2015
1 parent c936a79 commit 6decd63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/test_rhashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ static int __init test_rht_init(void)
total_time += time;
}

pr_info("Average test time: %llu\n", total_time / runs);
do_div(total_time, runs);
pr_info("Average test time: %llu\n", total_time);

return 0;
}
Expand Down

0 comments on commit 6decd63

Please sign in to comment.