diff options
author | Marco Elver <elver@google.com> | 2021-08-09 13:25:15 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-09-13 16:41:19 -0700 |
commit | d627c537c2585875bba071bbfa7cda20328f982b (patch) | |
tree | 0055d1e9079f4ae5c8a7459f95070a2abcaaf6de /kernel/kcsan/kcsan_test.c | |
parent | 6c65eb75686fc2068c926a73c9c3631b5f0e4c9c (diff) | |
download | linux-d627c537c2585875bba071bbfa7cda20328f982b.tar.gz linux-d627c537c2585875bba071bbfa7cda20328f982b.tar.bz2 linux-d627c537c2585875bba071bbfa7cda20328f982b.zip |
kcsan: Support reporting scoped read-write access type
Support generating the string representation of scoped read-write
accesses for completeness. They will become required in planned changes.
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/kcsan/kcsan_test.c')
-rw-r--r-- | kernel/kcsan/kcsan_test.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan/kcsan_test.c index a3b12429e1d3..660729238588 100644 --- a/kernel/kcsan/kcsan_test.c +++ b/kernel/kcsan/kcsan_test.c @@ -210,10 +210,12 @@ static bool report_matches(const struct expect_report *r) "read-write" : "write") : "read"); + const bool is_atomic = (ty & KCSAN_ACCESS_ATOMIC); + const bool is_scoped = (ty & KCSAN_ACCESS_SCOPED); const char *const access_type_aux = - (ty & KCSAN_ACCESS_ATOMIC) ? - " (marked)" : - ((ty & KCSAN_ACCESS_SCOPED) ? " (scoped)" : ""); + (is_atomic && is_scoped) ? " (marked, scoped)" + : (is_atomic ? " (marked)" + : (is_scoped ? " (scoped)" : "")); if (i == 1) { /* Access 2 */ |