diff options
author | Boqun Feng <boqun.feng@gmail.com> | 2020-08-07 15:42:22 +0800 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-08-26 12:42:03 +0200 |
commit | b11be024de164213f6338973d76ab9ab139120cd (patch) | |
tree | 99a37e09244b3000272385ded528d38d0814e775 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 224ec489d3cdb0af6794e257eeee39d98dc9c5b2 (diff) |
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/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions