aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/c++/clang.cpp
diff options
context:
space:
mode:
authorMikulas Patocka <[email protected]>2019-04-26 09:59:24 -0400
committerMike Snitzer <[email protected]>2019-04-26 11:48:03 -0400
commitf8011d334426cee77276a1038b627b5cb0470258 (patch)
treecefef25958a2adff23ebadbd60b7f2b761db92f9 /tools/perf/util/c++/clang.cpp
parent08a8e804620bbb41d06d144441d19c589bb17aa4 (diff)
dm writecache: avoid unnecessary lookups in writecache_find_entry()
This is a small optimization in writecache_find_entry(). If we go past the condition "if (unlikely(!node))", we can be certain that there is no entry in the tree that has the block equal to the "block" variable. Consequently, we can return the next entry directly, we don't need to go to the second part of the function that finds the entry with lowest or highest seq number that matches the "block" variable. Also, add some whitespace and cleanup needless braces. Suggested-by: Huaisheng Ye <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
Diffstat (limited to 'tools/perf/util/c++/clang.cpp')
0 files changed, 0 insertions, 0 deletions