Hi Hari, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on hnaz-linux-mm/master linus/master v5.8-rc7 next-20200729] [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] url: https://github.com/0day-ci/linux/commits/Hari-Bathini/kexec_file-allow-archs-to-handle-special-regions-while-locating-memory-hole/20200727-043703 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-randconfig-s031-20200729 (attached as .config) compiler: powerpc64-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.2-97-gee4aea9a-dirty # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> arch/powerpc/kexec/file_load_64.c:391:45: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] @@ got restricted __be64 [usertype] @@ >> arch/powerpc/kexec/file_load_64.c:391:45: sparse: expected unsigned long long [usertype] >> arch/powerpc/kexec/file_load_64.c:391:45: sparse: got restricted __be64 [usertype] arch/powerpc/kexec/file_load_64.c:392:45: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] @@ got restricted __be64 [usertype] @@ arch/powerpc/kexec/file_load_64.c:392:45: sparse: expected unsigned long long [usertype] arch/powerpc/kexec/file_load_64.c:392:45: sparse: got restricted __be64 [usertype] arch/powerpc/kexec/file_load_64.c:439:39: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] @@ got restricted __be64 [usertype] @@ arch/powerpc/kexec/file_load_64.c:439:39: sparse: expected unsigned long long [usertype] arch/powerpc/kexec/file_load_64.c:439:39: sparse: got restricted __be64 [usertype] vim +391 arch/powerpc/kexec/file_load_64.c 351 352 /** 353 * add_usable_mem - Add the usable memory ranges within the given memory range 354 * to the buffer 355 * @um_info: Usable memory buffer and ranges info. 356 * @base: Base address of memory range to look for. 357 * @end: End address of memory range to look for. 358 * @cnt: No. of usable memory ranges added to buffer. 359 * 360 * Returns 0 on success, negative errno on error. 361 */ 362 static int add_usable_mem(struct umem_info *um_info, uint64_t base, 363 uint64_t end, int *cnt) 364 { 365 uint64_t loc_base, loc_end, *buf; 366 const struct crash_mem *umrngs; 367 int i, add; 368 369 *cnt = 0; 370 umrngs = um_info->umrngs; 371 for (i = 0; i < umrngs->nr_ranges; i++) { 372 add = 0; 373 loc_base = umrngs->ranges[i].start; 374 loc_end = umrngs->ranges[i].end; 375 if (loc_base >= base && loc_end <= end) 376 add = 1; 377 else if (base < loc_end && end > loc_base) { 378 if (loc_base < base) 379 loc_base = base; 380 if (loc_end > end) 381 loc_end = end; 382 add = 1; 383 } 384 385 if (add) { 386 buf = check_realloc_usable_mem(um_info, 2); 387 if (!buf) 388 return -ENOMEM; 389 390 um_info->buf = buf; > 391 buf[um_info->idx++] = cpu_to_be64(loc_base); 392 buf[um_info->idx++] = 393 cpu_to_be64(loc_end - loc_base + 1); 394 (*cnt)++; 395 } 396 } 397 398 return 0; 399 } 400 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org