]> git.ipfire.org Git - thirdparty/linux.git/commit
kunit: fix up const mis-match in many assert functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Dec 2025 12:32:47 +0000 (13:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Jan 2026 15:36:08 +0000 (16:36 +0100)
commit68a9459a5c4e8b978c3eb5d75be5446799e483de
tree547055454f097d5f54286090444ee7cee9830aa5
parent86b31a2c81817d09cb5cbea9457a9f294ed9bb7d
kunit: fix up const mis-match in many assert functions

In many kunit assert functions a const pointer is passed to
container_of() and out pops a non-const pointer, which really isn't the
correct thing to do at all.  Fix this up by correctly marking the
casted-to pointer as const to preserve the marking.

Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Rae Moar <raemoar63@gmail.com>
Cc: linux-kselftest@vger.kernel.org
Cc: kunit-dev@googlegroups.com
Reviewed-by: David Gow <davidgow@google.com>
Link: https://patch.msgid.link/2025121746-result-staleness-5a68@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/kunit/assert.c