summaryrefslogtreecommitdiffstats
path: root/include/kunit
diff options
context:
space:
mode:
authorDaniel Latypov <dlatypov@google.com>2022-10-01 02:26:38 +0200
committerShuah Khan <skhan@linuxfoundation.org>2022-10-07 18:19:18 +0200
commitc1144e01063e67f807517a393b91fae054929dc8 (patch)
tree0c77b3939672d3a1e51013bc9f1f4e50a1c2dc23 /include/kunit
parentkunit: rename base KUNIT_ASSERTION macro to _KUNIT_FAILED (diff)
downloadlinux-c1144e01063e67f807517a393b91fae054929dc8.tar.xz
linux-c1144e01063e67f807517a393b91fae054929dc8.zip
kunit: declare kunit_assert structs as const
Everywhere we use the assert structs now takes them via const*, as of commit 7466886b400b ("kunit: take `kunit_assert` as `const`"). So now let's properly declare the structs as const as well. Signed-off-by: Daniel Latypov <dlatypov@google.com> Reviewed-by: David Gow <davidgow@google.com> Reviewed-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'include/kunit')
-rw-r--r--include/kunit/test.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/kunit/test.h b/include/kunit/test.h
index 38a1aac72fb2..b1ab6b32216d 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -478,7 +478,7 @@ void kunit_do_failed_assertion(struct kunit *test,
#define _KUNIT_FAILED(test, assert_type, assert_class, assert_format, INITIALIZER, fmt, ...) do { \
static const struct kunit_loc __loc = KUNIT_CURRENT_LOC; \
- struct assert_class __assertion = INITIALIZER; \
+ const struct assert_class __assertion = INITIALIZER; \
kunit_do_failed_assertion(test, \
&__loc, \
assert_type, \