aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorDaniel Bristot de Oliveira <[email protected]>2021-06-29 19:10:26 +0200
committerSteven Rostedt (VMware) <[email protected]>2021-06-29 16:37:50 -0400
commit19c3eaa72288ce161441dd6b74b765a094d73488 (patch)
tree1aa3dad24893fa906cbca4b021e14d29ef8d9251 /tools/perf/scripts/python/export-to-sqlite.py
parent9913d5745bd720c4266805c8d29952a3702e4eca (diff)
trace/osnoise: Make 'noise' variable s64 in run_osnoise()
Dab Carpenter reported that: The patch bce29ac9ce0b: "trace: Add osnoise tracer" from Jun 22, 2021, leads to the following static checker warning: kernel/trace/trace_osnoise.c:1103 run_osnoise() warn: unsigned 'noise' is never less than zero. In this part of the code: 1100 /* 1101 * This shouldn't happen. 1102 */ 1103 if (noise < 0) { ^^^^^^^^^ 1104 osnoise_taint("negative noise!"); 1105 goto out; 1106 } 1107 And the static checker is right because 'noise' is u64. Make noise s64 and keep the check. It is important to check if the time read is behaving correctly - so we can trust the results. I also re-arranged some variable declarations. Link: https://lkml.kernel.org/r/acd7cd6e7d56b798a298c3bc8139a390b3c4ab52.1624986368.git.bristot@redhat.com Cc: Ingo Molnar <[email protected]> Cc: Daniel Bristot de Oliveira <[email protected]> Cc: Dan Carpenter <[email protected]> Cc: [email protected] Fixes: bce29ac9ce0b ("trace: Add osnoise tracer") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions