Messages in this thread | | | Date | Thu, 24 Mar 2022 15:34:27 +0800 | From | kernel test robot <> | Subject | [norov:bitmap 5/49] drivers/net/ethernet/qlogic/qed/qed_rdma.c:338:11: warning: comparison of distinct pointer types ('typeof (bmap->max_count - bit) *' (aka 'unsigned int *') and 'typeof (512) *' (aka 'int *')) |
| |
tree: https://github.com/norov/linux bitmap head: d56897e7da0ce165cd3f983526a76013dd4c1bc1 commit: 4a18f9ef6b1ed1e87ca56f01d1f1a402809982e7 [5/49] qed: rework qed_rdma_bmap_free() config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220324/202203241543.fPNu5JUu-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 902f4708fe1d03b0de7e5315ef875006a6adc319) 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 arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/norov/linux/commit/4a18f9ef6b1ed1e87ca56f01d1f1a402809982e7 git remote add norov https://github.com/norov/linux git fetch --no-tags norov bitmap git checkout 4a18f9ef6b1ed1e87ca56f01d1f1a402809982e7 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/i2c/busses/ drivers/net/ethernet/qlogic/qed/
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/qlogic/qed/qed_rdma.c:338:11: warning: comparison of distinct pointer types ('typeof (bmap->max_count - bit) *' (aka 'unsigned int *') and 'typeof (512) *' (aka 'int *')) [-Wcompare-distinct-pointer-types] nbits = min(bmap->max_count - bit, 512); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^~~~~~~~~~~~~~~~~~~~~~ include/linux/minmax.h:36:24: note: expanded from macro '__careful_cmp' __builtin_choose_expr(__safe_cmp(x, y), \ ^~~~~~~~~~~~~~~~ include/linux/minmax.h:26:4: note: expanded from macro '__safe_cmp' (__typecheck(x, y) && __no_side_effects(x, y)) ^~~~~~~~~~~~~~~~~ include/linux/minmax.h:20:28: note: expanded from macro '__typecheck' (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ 1 warning generated.
vim +338 drivers/net/ethernet/qlogic/qed/qed_rdma.c
318 319 void qed_rdma_bmap_free(struct qed_hwfn *p_hwfn, 320 struct qed_bmap *bmap, bool check) 321 { 322 unsigned int bit, weight, nbits; 323 unsigned long *b; 324 325 if (!check) 326 goto end; 327 328 weight = bitmap_weight(bmap->bitmap, bmap->max_count); 329 if (!weight) 330 goto end; 331 332 DP_NOTICE(p_hwfn, 333 "%s bitmap not free - size=%d, weight=%d, 512 bits per line\n", 334 bmap->name, bmap->max_count, weight); 335 336 for (bit = 0; bit < bmap->max_count; bit += 512) { 337 b = bmap->bitmap + BITS_TO_LONGS(bit); > 338 nbits = min(bmap->max_count - bit, 512); 339 340 if (!bitmap_empty(b, nbits)) 341 DP_NOTICE(p_hwfn, 342 "line 0x%04x: %*pb\n", bit / 512, nbits, b); 343 } 344 345 end: 346 kfree(bmap->bitmap); 347 bmap->bitmap = NULL; 348 } 349
-- 0-DAY CI Kernel Test Service https://01.org/lkp
| |