“e7e7e0c084ef862d5754701108d4a038514d6314”上不存在“kernel/git@gitcode.net:openharmony/kernel_linux.git”
greybus: loopback: Fix averaging
Currently, we are adding 0.5 to the average to round the average. But we are using the remainder to calculate the decimal, so we do not need to round the average. In addition, use a u64 type for the remainder to avoid overflow that might happen when stats->sum value is too big, usually for requests per seconds and the throughput. Signed-off-by: NAlexandre Bailon <abailon@baylibre.com> Reviewed-by: NJohan Hovold <johan@hovoldconsulting.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@google.com>
Showing
想要评论请 注册 或 登录