lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 12 Sep 2023 02:40:36 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Gow <davidgow@...gle.com>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        linux-kernel@...r.kernel.org,
        Shuah Khan <skhan@...uxfoundation.org>,
        Benjamin Berg <benjamin.berg@...el.com>,
        Maxime Ripard <maxime@...no.tech>
Subject: lib/kunit/test.c:764:38: warning: cast from 'void (*)(const void *)'
 to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible
 function type

Hi David,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0bb80ecc33a8fb5a682236443c1e740d5c917d1d
commit: 57e3cded99e9c840bc5310878d0a7f4e7768a296 kunit: kmalloc_array: Use kunit_add_action()
date:   4 months ago
config: x86_64-randconfig-013-20230909 (https://download.01.org/0day-ci/archive/20230912/202309120232.7wrRuydH-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230912/202309120232.7wrRuydH-lkp@intel.com/reproduce)

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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309120232.7wrRuydH-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> lib/kunit/test.c:764:38: warning: cast from 'void (*)(const void *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
           if (kunit_add_action_or_reset(test, (kunit_action_t *)kfree, data) != 0)
                                               ^~~~~~~~~~~~~~~~~~~~~~~
   lib/kunit/test.c:776:29: warning: cast from 'void (*)(const void *)' to 'kunit_action_t *' (aka 'void (*)(void *)') converts to incompatible function type [-Wcast-function-type-strict]
           kunit_release_action(test, (kunit_action_t *)kfree, (void *)ptr);
                                      ^~~~~~~~~~~~~~~~~~~~~~~
   2 warnings generated.


vim +764 lib/kunit/test.c

   754	
   755	void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t gfp)
   756	{
   757		void *data;
   758	
   759		data = kmalloc_array(n, size, gfp);
   760	
   761		if (!data)
   762			return NULL;
   763	
 > 764		if (kunit_add_action_or_reset(test, (kunit_action_t *)kfree, data) != 0)
   765			return NULL;
   766	
   767		return data;
   768	}
   769	EXPORT_SYMBOL_GPL(kunit_kmalloc_array);
   770	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ