[ammarfaizi2-block:akpm/mm/mm-unstable 592/601] drivers/block/zram/zram_drv.c:1236:23: error: incompatible pointer types passing 'atomic_long_t *' (aka 'atomic_t *') to parameter of type 'const atomic64_t *'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://github.com/ammarfaizi2/linux-block akpm/mm/mm-unstable
head:   9323c8b93d95807ac6be21e63514f5b6c6c4cbd8
commit: b7d89654a988a2a4e6181397b8d05690b5758508 [592/601] zram: show zsmalloc objs_moved stat in mm_stat
config: powerpc-buildonly-randconfig-r004-20230222 (https://download.01.org/0day-ci/archive/20230224/202302241840.nwdXqE5r-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project db89896bbbd2251fff457699635acbbedeead27f)
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
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://github.com/ammarfaizi2/linux-block/commit/b7d89654a988a2a4e6181397b8d05690b5758508
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block akpm/mm/mm-unstable
        git checkout b7d89654a988a2a4e6181397b8d05690b5758508
        # 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=powerpc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/block/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202302241840.nwdXqE5r-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/block/zram/zram_drv.c:1236:23: error: incompatible pointer types passing 'atomic_long_t *' (aka 'atomic_t *') to parameter of type 'const atomic64_t *' [-Werror,-Wincompatible-pointer-types]
                           (u64)atomic64_read(&pool_stats.objs_moved));
                                              ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/atomic/atomic-instrumented.h:644:33: note: passing argument to parameter 'v' here
   atomic64_read(const atomic64_t *v)
                                   ^
   1 error generated.


vim +1236 drivers/block/zram/zram_drv.c

  1204	
  1205	static ssize_t mm_stat_show(struct device *dev,
  1206			struct device_attribute *attr, char *buf)
  1207	{
  1208		struct zram *zram = dev_to_zram(dev);
  1209		struct zs_pool_stats pool_stats;
  1210		u64 orig_size, mem_used = 0;
  1211		long max_used;
  1212		ssize_t ret;
  1213	
  1214		memset(&pool_stats, 0x00, sizeof(struct zs_pool_stats));
  1215	
  1216		down_read(&zram->init_lock);
  1217		if (init_done(zram)) {
  1218			mem_used = zs_get_total_pages(zram->mem_pool);
  1219			zs_pool_stats(zram->mem_pool, &pool_stats);
  1220		}
  1221	
  1222		orig_size = atomic64_read(&zram->stats.pages_stored);
  1223		max_used = atomic_long_read(&zram->stats.max_used_pages);
  1224	
  1225		ret = scnprintf(buf, PAGE_SIZE,
  1226				"%8llu %8llu %8llu %8lu %8ld %8llu %8lu %8llu %8llu %8llu\n",
  1227				orig_size << PAGE_SHIFT,
  1228				(u64)atomic64_read(&zram->stats.compr_data_size),
  1229				mem_used << PAGE_SHIFT,
  1230				zram->limit_pages << PAGE_SHIFT,
  1231				max_used << PAGE_SHIFT,
  1232				(u64)atomic64_read(&zram->stats.same_pages),
  1233				atomic_long_read(&pool_stats.pages_compacted),
  1234				(u64)atomic64_read(&zram->stats.huge_pages),
  1235				(u64)atomic64_read(&zram->stats.huge_pages_since),
> 1236				(u64)atomic64_read(&pool_stats.objs_moved));
  1237		up_read(&zram->init_lock);
  1238	
  1239		return ret;
  1240	}
  1241	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux