Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Daniel Latypov and committed by
Shuah Khan
c1144e01 97d453bc

+1 -1
+1 -1
include/kunit/test.h
··· 478 478 479 479 #define _KUNIT_FAILED(test, assert_type, assert_class, assert_format, INITIALIZER, fmt, ...) do { \ 480 480 static const struct kunit_loc __loc = KUNIT_CURRENT_LOC; \ 481 - struct assert_class __assertion = INITIALIZER; \ 481 + const struct assert_class __assertion = INITIALIZER; \ 482 482 kunit_do_failed_assertion(test, \ 483 483 &__loc, \ 484 484 assert_type, \