Hi Kairui, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on linux/master] [also build test WARNING on linus/master v5.9-rc4 next-20200908] [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/Kairui-Song/Add-writing-support-to-vmcore-for-reusing-oldmem/20200909-155222 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bcf876870b95592b52519ed4aafcf9d95999bc9c config: mips-randconfig-r035-20200909 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 8893d0816ccdf8998d2e21b5430e9d6abe7ef465) 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 mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> fs/proc/vmcore.c:118:14: warning: comparison of distinct pointer types ('typeof (to_copy) *' (aka 'unsigned int *') and 'typeof (((1UL) << 14) - offset) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types] nr_bytes = min(to_copy, PAGE_SIZE - offset); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:884:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^~~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:875:24: note: expanded from macro '__careful_cmp' __builtin_choose_expr(__safe_cmp(x, y), \ ^~~~~~~~~~~~~~~~ include/linux/kernel.h:865:4: note: expanded from macro '__safe_cmp' (__typecheck(x, y) && __no_side_effects(x, y)) ^~~~~~~~~~~~~~~~~ include/linux/kernel.h:851:29: note: expanded from macro '__typecheck' (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ 1 warning generated. # https://github.com/0day-ci/linux/commit/03450912209f6cc4521a2d3a83d1cc8f4b5a850e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Kairui-Song/Add-writing-support-to-vmcore-for-reusing-oldmem/20200909-155222 git checkout 03450912209f6cc4521a2d3a83d1cc8f4b5a850e vim +118 fs/proc/vmcore.c 104 105 /* Reads a page from the oldmem device from given offset. */ 106 ssize_t read_from_oldmem(char *buf, size_t count, 107 u64 *ppos, int userbuf, 108 bool encrypted) 109 { 110 unsigned long pfn, offset; 111 size_t nr_bytes, to_copy = count; 112 ssize_t tmp; 113 114 offset = (unsigned long)(*ppos & (PAGE_SIZE - 1)); 115 pfn = (unsigned long)(*ppos / PAGE_SIZE); 116 117 while (to_copy) { > 118 nr_bytes = min(to_copy, PAGE_SIZE - offset); 119 120 /* If pfn is not ram, return zeros for sparse dump files */ 121 if (pfn_is_ram(pfn) == 0) { 122 memset(buf, 0, nr_bytes); 123 } else { 124 if (encrypted) 125 tmp = copy_oldmem_page_encrypted(pfn, buf, 126 nr_bytes, 127 offset, 128 userbuf); 129 else 130 tmp = copy_oldmem_page(pfn, buf, nr_bytes, 131 offset, userbuf); 132 133 if (tmp < 0) 134 return tmp; 135 } 136 *ppos += nr_bytes; 137 buf += nr_bytes; 138 to_copy -= nr_bytes; 139 ++pfn; 140 offset = 0; 141 } 142 143 return count; 144 } 145 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org