diff options
author | 2020-08-07 15:42:22 +0800 | |
---|---|---|
committer | 2020-08-26 12:42:03 +0200 | |
commit | b11be024de164213f6338973d76ab9ab139120cd (patch) | |
tree | 99a37e09244b3000272385ded528d38d0814e775 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | lockdep/Documention: Recursive read lock detection reasoning (diff) | |
download | linux-dev-b11be024de164213f6338973d76ab9ab139120cd.tar.xz linux-dev-b11be024de164213f6338973d76ab9ab139120cd.zip |
lockdep: Demagic the return value of BFS
__bfs() could return four magic numbers:
1: search succeeds, but none match.
0: search succeeds, find one match.
-1: search fails because of the cq is full.
-2: search fails because a invalid node is found.
This patch cleans things up by using a enum type for the return value
of __bfs() and its friends, this improves the code readability of the
code, and further, could help if we want to extend the BFS.
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200807074238.1632519-4-boqun.feng@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions