[arm:ktext-current 1/19] drivers/md/dm-stats.c:91:32: sparse: sparse: incompatible types in comparison expression (different type sizes):

kernel test robot lkp at intel.com
Sat Jul 22 16:10:35 PDT 2023


tree:   git://git.armlinux.org.uk/~rmk/linux-arm.git ktext-current
head:   49e3458967802a6981190b5a1fa9fd66dbf58f8c
commit: 631e7c45f5d4cf043cd236a921c341e3dd9f1909 [1/19] arm64: place kernel in its own L0 page table entry
config: arm64-randconfig-r083-20230723 (https://download.01.org/0day-ci/archive/20230723/202307230723.oI8kN7T7-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230723/202307230723.oI8kN7T7-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307230723.oI8kN7T7-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/md/dm-stats.c:91:32: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/md/dm-stats.c:91:32: sparse:    unsigned int *
>> drivers/md/dm-stats.c:91:32: sparse:    unsigned long *
--
>> drivers/md/dm-bufio.c:2842:19: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/md/dm-bufio.c:2842:19: sparse:    unsigned int *
>> drivers/md/dm-bufio.c:2842:19: sparse:    unsigned long *
>> drivers/md/dm-bufio.c:2842:19: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> drivers/md/dm-bufio.c:2842:19: sparse:    unsigned int *
>> drivers/md/dm-bufio.c:2842:19: sparse:    unsigned long *
>> drivers/md/dm-bufio.c:2842:19: sparse: sparse: incompatible types for operation (/):
>> drivers/md/dm-bufio.c:2842:19: sparse:    bad type x_
>> drivers/md/dm-bufio.c:2842:19: sparse:    int d_
   drivers/md/dm-bufio.c:2842:19: sparse: sparse: incompatible types for operation (%):
>> drivers/md/dm-bufio.c:2842:19: sparse:    bad type x_
>> drivers/md/dm-bufio.c:2842:19: sparse:    int d_
   drivers/md/dm-bufio.c:2842:19: sparse: sparse: incompatible types for operation (*):
>> drivers/md/dm-bufio.c:2842:19: sparse:    bad type q
>> drivers/md/dm-bufio.c:2842:19: sparse:    int n_
   drivers/md/dm-bufio.c:2842:19: sparse: sparse: incompatible types for operation (*):
>> drivers/md/dm-bufio.c:2842:19: sparse:    bad type r
>> drivers/md/dm-bufio.c:2842:19: sparse:    int n_
   drivers/md/dm-bufio.c:2842:17: sparse: sparse: incompatible types for operation (>):
>> drivers/md/dm-bufio.c:2842:17: sparse:    unsigned long long [assigned] [usertype] mem
>> drivers/md/dm-bufio.c:2842:17: sparse:    void
   drivers/md/dm-bufio.c:2843:23: sparse: sparse: incompatible types in comparison expression (different type sizes):
   drivers/md/dm-bufio.c:2843:23: sparse:    unsigned int *
   drivers/md/dm-bufio.c:2843:23: sparse:    unsigned long *
   drivers/md/dm-bufio.c:2843:23: sparse: sparse: incompatible types in comparison expression (different type sizes):
   drivers/md/dm-bufio.c:2843:23: sparse:    unsigned int *
   drivers/md/dm-bufio.c:2843:23: sparse:    unsigned long *
   drivers/md/dm-bufio.c:2843:23: sparse: sparse: incompatible types for operation (/):
   drivers/md/dm-bufio.c:2843:23: sparse:    bad type x_
   drivers/md/dm-bufio.c:2843:23: sparse:    int d_
   drivers/md/dm-bufio.c:2843:23: sparse: sparse: incompatible types for operation (%):
   drivers/md/dm-bufio.c:2843:23: sparse:    bad type x_
   drivers/md/dm-bufio.c:2843:23: sparse:    int d_
   drivers/md/dm-bufio.c:2843:23: sparse: sparse: incompatible types for operation (*):
   drivers/md/dm-bufio.c:2843:23: sparse:    bad type q
   drivers/md/dm-bufio.c:2843:23: sparse:    int n_
   drivers/md/dm-bufio.c:2843:23: sparse: sparse: incompatible types for operation (*):
   drivers/md/dm-bufio.c:2843:23: sparse:    bad type r
   drivers/md/dm-bufio.c:2843:23: sparse:    int n_

vim +91 drivers/md/dm-stats.c

fd2ed4d252701d Mikulas Patocka 2013-08-16  80  
fd2ed4d252701d Mikulas Patocka 2013-08-16  81  static bool __check_shared_memory(size_t alloc_size)
fd2ed4d252701d Mikulas Patocka 2013-08-16  82  {
fd2ed4d252701d Mikulas Patocka 2013-08-16  83  	size_t a;
fd2ed4d252701d Mikulas Patocka 2013-08-16  84  
fd2ed4d252701d Mikulas Patocka 2013-08-16  85  	a = shared_memory_amount + alloc_size;
fd2ed4d252701d Mikulas Patocka 2013-08-16  86  	if (a < shared_memory_amount)
fd2ed4d252701d Mikulas Patocka 2013-08-16  87  		return false;
ca79b0c211af63 Arun KS         2018-12-28  88  	if (a >> PAGE_SHIFT > totalram_pages() / DM_STATS_MEMORY_FACTOR)
fd2ed4d252701d Mikulas Patocka 2013-08-16  89  		return false;
fd2ed4d252701d Mikulas Patocka 2013-08-16  90  #ifdef CONFIG_MMU
fd2ed4d252701d Mikulas Patocka 2013-08-16 @91  	if (a > (VMALLOC_END - VMALLOC_START) / DM_STATS_VMALLOC_FACTOR)
fd2ed4d252701d Mikulas Patocka 2013-08-16  92  		return false;
fd2ed4d252701d Mikulas Patocka 2013-08-16  93  #endif
fd2ed4d252701d Mikulas Patocka 2013-08-16  94  	return true;
fd2ed4d252701d Mikulas Patocka 2013-08-16  95  }
fd2ed4d252701d Mikulas Patocka 2013-08-16  96  

:::::: The code at line 91 was first introduced by commit
:::::: fd2ed4d252701d3bbed4cd3e3d267ad469bb832a dm: add statistics support

:::::: TO: Mikulas Patocka <mpatocka at redhat.com>
:::::: CC: Mike Snitzer <snitzer at redhat.com>

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



More information about the linux-arm-kernel mailing list