h is already used twice in trace_do_benchmark() when
calculating the standard deviation:
do_div(stddev, (u32)bm_cnt);
do_div(stddev, (u32)bm_cnt - 1);
Signed-off-by: Thorsten Blum
---
Changes in v2:
- Update patch with latest changes from master
- Update patch title and description
---
kernel/
h is already used twice in trace_do_benchmark() when
calculating the standard deviation:
do_div(stddev, (u32)bm_cnt);
do_div(stddev, (u32)bm_cnt - 1);
Signed-off-by: Thorsten Blum
---
Changes in v2:
- Update patch with latest changes from master
- Update patch title and description
---
kernel/
On 20. Mar 2024, at 16:01, Thorsten Blum wrote:
>
> Coccinelle also finds this one, but please ignore this patch as I just
> realized
> this was already fixed in another patch of mine from February.
>
> Sorry for the inconvenience.
>
> Link:
> https://l
On 20. Mar 2024, at 11:27, Masami Hiramatsu (Google)
wrote:
>
> Hmm, strange, trace_do_benchmark() has another do_div(u64, u64).
>
>do {
>last_seed = seed;
>seed = stddev;
>if (!last_seed)
>
Explicitly cast the divisor to u32 to fix a Coccinelle/coccicheck warning
reported by do_div.cocci.
Signed-off-by: Thorsten Blum
---
kernel/trace/trace_benchmark.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_benchmark.c b/kernel/trace/trace_benchmark.c
Fixes Coccinelle/coccicheck warnings reported by do_div.cocci.
Compared to do_div(), div64_u64() does not implicitly cast the divisor and
does not unnecessarily calculate the remainder.
Signed-off-by: Thorsten Blum
---
kernel/trace/trace_benchmark.c | 5 ++---
1 file changed, 2 insertions
Fix trace_string() by assigning the string length to the return variable
which got lost in commit ddeea494a16f ("tracing/synthetic: Use union
instead of casts") and caused trace_string() to always return 0.
Signed-off-by: Thorsten Blum
---
kernel/trace/trace_events_synth.c | 3 +
7 matches
Mail list logo