linux/tools/testing/selftests/powerpc/pmu
Peter Senna Tschudin 0e27d27e0d selftests/powerpc: Return false instead of -1 in require_paranoia_below()
Returning a negative value for a boolean function seem to have the
undesired effect of returning true. require_paranoia_below() is a
boolean function, but the variable used to store the return value is an
integer, receiving -1 or 0. This patch converts rc to bool, replaces -1
by false, and 0 by true.

mpe: This wasn't exhibiting in practice because the common case, where
we do the comparison of the desired level vs the current value, was
being compiled into a computation based on the result of the comparison,
ie. it wasn't using the default -1 value at all. However that was just
luck and the code is still wrong.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2016-11-14 20:06:00 +11:00
..
ebb selftests/powerpc: Revert Load Monitor Register Tests 2016-11-14 20:05:38 +11:00
.gitignore selftests/powerpc: Make git ignore all binaries in powerpc test suite 2015-01-23 14:02:49 +11:00
count_instructions.c selftests/powerpc: Count more instructions & use decimal 2014-07-28 14:11:31 +10:00
event.c selftests/powerpc: Add tests of PMU EBBs 2014-06-11 17:03:58 +10:00
event.h selftests/powerpc: Add tests of PMU EBBs 2014-06-11 17:03:58 +10:00
l3_bank_test.c selftests/powerpc: Add test of L3 bank handling 2014-07-28 14:11:30 +10:00
lib.c selftests/powerpc: Return false instead of -1 in require_paranoia_below() 2016-11-14 20:06:00 +11:00
lib.h selftests/powerpc: Move pick_online_cpu() up into utils.c 2015-12-17 10:46:41 +11:00
loop.S
Makefile selftests/powerpc: Move pick_online_cpu() up into utils.c 2015-12-17 10:46:41 +11:00
per_event_excludes.c selftests/powerpc: Add test of per-event excludes 2014-07-28 14:11:33 +10:00