tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 53ab6975c12d1ad86c599a8927e8c698b144d669 commit: 00e63f8afcfc6bf93d75141c51d35e8a40e86363 [4217/8413] kunit: executor_test: Use kunit_add_action() config: hexagon-randconfig-r045-20230612 (https://download.01.org/0day-ci/archive/20230612/202306122325.N7YrihQV-lkp@xxxxxxxxx/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce (this is a W=1 build): mkdir -p ~/bin wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=00e63f8afcfc6bf93d75141c51d35e8a40e86363 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 00e63f8afcfc6bf93d75141c51d35e8a40e86363 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=hexagon olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash lib/ If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202306122325.N7YrihQV-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): In file included from lib/kunit/executor.c:223: >> lib/kunit/executor_test.c:138:4: warning: cast from 'void (*)(const void *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict] 138 | (kunit_action_t *)kfree, | ^~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. vim +138 lib/kunit/executor_test.c 127 128 /* Use the resource API to register a call to kfree(to_free). 129 * Since we never actually use the resource, it's safe to use on const data. 130 */ 131 static void kfree_at_end(struct kunit *test, const void *to_free) 132 { 133 /* kfree() handles NULL already, but avoid allocating a no-op cleanup. */ 134 if (IS_ERR_OR_NULL(to_free)) 135 return; 136 137 kunit_add_action(test, > 138 (kunit_action_t *)kfree, 139 (void *)to_free); 140 } 141 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki