Richard Fitzgerald 1bddcf77ce kunit: test: Avoid cast warning when adding kfree() as an action
In kunit_log_test() pass the kfree_wrapper() function to kunit_add_action()
instead of directly passing kfree().

This prevents a cast warning:

lib/kunit/kunit-test.c:565:25: warning: cast from 'void (*)(const void *)'
to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible
function type [-Wcast-function-type-strict]

   564		full_log = string_stream_get_string(test->log);
 > 565		kunit_add_action(test, (kunit_action_t *)kfree, full_log);

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311070041.kWVYx7YP-lkp@intel.com/
Fixes: 05e2006ce493 ("kunit: Use string_stream for test log")
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-11-14 13:01:57 -07:00
..
2023-10-01 23:09:02 +11:00
2023-09-11 08:13:18 +00:00
2023-06-09 17:44:13 -07:00
2018-08-16 12:14:42 -07:00
2023-04-08 13:45:37 -07:00
2023-10-30 21:48:22 -04:00
2023-11-03 07:08:36 -10:00
2021-01-21 14:06:00 -07:00
2022-03-07 12:48:35 -07:00
2021-08-19 09:02:55 +09:00
2023-02-02 22:50:01 -08:00
2023-02-02 22:50:01 -08:00
2022-04-22 21:30:57 +02:00
2023-09-11 23:59:47 -04:00
2021-01-03 20:05:18 -05:00
2023-03-19 10:02:04 -07:00
2022-03-07 12:48:35 -07:00
2022-04-29 14:38:01 -07:00
2022-10-03 14:03:21 -07:00
2021-08-19 09:02:55 +09:00
2023-11-04 16:20:36 -10:00
2023-11-01 16:15:42 -10:00
2021-07-08 11:48:20 -07:00
2023-08-21 13:46:25 -07:00
2023-04-17 18:01:23 +02:00
2021-07-08 11:48:20 -07:00
2023-10-16 12:44:06 -04:00
2023-08-24 16:20:18 -07:00
2023-10-16 12:44:06 -04:00
2023-11-04 16:20:36 -10:00
2018-10-16 13:45:44 +02:00
2022-10-03 17:34:32 -07:00
2021-07-08 11:48:20 -07:00
2023-07-21 11:40:20 -06:00
2023-11-02 00:19:44 -04:00
2022-06-03 10:34:34 -07:00
2021-06-18 11:43:09 +02:00
2021-07-08 11:48:20 -07:00
2022-01-20 08:52:54 +02:00
2018-10-15 16:31:29 -04:00
2022-12-13 15:47:48 -08:00