瀏覽代碼

rhashtable-test: Fix 64bit division

A 64bit division went in unnoticed. Use do_div() to accomodate
non 64bit architectures.

Reported-by: kbuild test robot
Fixes: 1aa661f5c3df ("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>
Thomas Graf 10 年之前
父節點
當前提交
6decd63aca
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lib/test_rhashtable.c

+ 2 - 1
lib/test_rhashtable.c

@@ -229,7 +229,8 @@ static int __init test_rht_init(void)
 		total_time += time;
 		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;
 	return 0;
 }
 }