lkml.org 
[lkml]   [2020]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] ftrace: avoid potential division by zero
> -               do_div(stddev, rec->counter * (rec->counter - 1) * 1000);
>
> + stddev = div64_ul(stddev,
> + rec->counter * (rec->counter - 1) * 1000);


Is a rec->counter > 1 assertion needed here?

\
 
 \ /
  Last update: 2020-01-03 09:01    [W:0.074 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site