Commit c1144e01 authored by Daniel Latypov's avatar Daniel Latypov Committed by Shuah Khan
Browse files

kunit: declare kunit_assert structs as const



Everywhere we use the assert structs now takes them via const*, as of
commit 7466886b ("kunit: take `kunit_assert` as `const`").

So now let's properly declare the structs as const as well.

Signed-off-by: default avatarDaniel Latypov <dlatypov@google.com>
Reviewed-by: default avatarDavid Gow <davidgow@google.com>
Reviewed-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 97d453bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,				       \