kcsan: Optimize debugfs stats counters
authorMarco Elver <elver@google.com>
Mon, 10 Aug 2020 08:06:25 +0000 (10:06 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 24 Aug 2020 22:10:23 +0000 (15:10 -0700)
commit2e986b81f698e73c95e6456183f27b861f47bb87
tree9a839aaf053ad9afb3de552674d66cd9a40bfda5
parent178a1877d782c034f466edd80e30a107af5469df
kcsan: Optimize debugfs stats counters

Remove kcsan_counter_inc/dec() functions, as they perform no other
logic, and are no longer needed.

This avoids several calls in kcsan_setup_watchpoint() and
kcsan_found_watchpoint(), as well as lets the compiler warn us about
potential out-of-bounds accesses as the array's size is known at all
usage sites at compile-time.

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/kcsan/core.c
kernel/kcsan/debugfs.c
kernel/kcsan/kcsan.h
kernel/kcsan/report.c