Hi David, kernel test robot noticed the following build warnings: [auto build test WARNING on lwn/docs-next] [also build test WARNING on linus/master v6.4-rc2 next-20230518] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/David-Gow/kunit-executor_test-Use-kunit_add_action/20230518-171005 base: git://git.lwn.net/linux.git docs-next patch link: https://lore.kernel.org/r/20230518083849.2631178-2-davidgow%40google.com patch subject: [PATCH v2 2/4] kunit: executor_test: Use kunit_add_action() config: hexagon-randconfig-r045-20230517 compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project b0fb98227c90adf2536c9ad644a74d5e92961111) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/38886419c3c213ab2922bd68236f87fa107d0f72 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review David-Gow/kunit-executor_test-Use-kunit_add_action/20230518-171005 git checkout 38886419c3c213ab2922bd68236f87fa107d0f72 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash lib/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202305190031.vmr3B8kS-lkp@intel.com/ 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] (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