Hi Lizhi, I love your patch! Perhaps something to improve: [auto build test WARNING on linux/master] [also build test WARNING on linus/master v5.12 next-20210427] [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/Lizhi-Hou/XRT-Alveo-driver-overview/20210428-050424 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1fe5501ba1abf2b7e78295df73675423bd6899a0 config: mips-allyesconfig (attached as .config) compiler: mips-linux-gcc (GCC) 9.3.0 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 # https://github.com/0day-ci/linux/commit/079fb263b22e0d961ac204b3928bdff5d8ebf3d5 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Lizhi-Hou/XRT-Alveo-driver-overview/20210428-050424 git checkout 079fb263b22e0d961ac204b3928bdff5d8ebf3d5 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=mips If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from include/linux/printk.h:409, from include/linux/kernel.h:16, from include/linux/list.h:9, from include/linux/preempt.h:11, from include/linux/spinlock.h:51, from include/linux/vmalloc.h:5, from drivers/fpga/xrt/lib/subdev.c:9: drivers/fpga/xrt/lib/subdev.c: In function 'metadata_output': >> drivers/fpga/xrt/lib/subdev.c:120:16: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 120 | dev_dbg(dev, "count (%ld) beyond left bytes: %lld\n", count, size - off); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/dynamic_debug.h:129:15: note: in definition of macro '__dynamic_func_call' 129 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ include/linux/dynamic_debug.h:161:2: note: in expansion of macro '_dynamic_func_call' 161 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \ | ^~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:123:2: note: in expansion of macro 'dynamic_dev_dbg' 123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~~~~~~~~ include/linux/dev_printk.h:123:23: note: in expansion of macro 'dev_fmt' 123 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~ drivers/fpga/xrt/lib/subdev.c:120:3: note: in expansion of macro 'dev_dbg' 120 | dev_dbg(dev, "count (%ld) beyond left bytes: %lld\n", count, size - off); | ^~~~~~~ drivers/fpga/xrt/lib/subdev.c:120:26: note: format string is defined here 120 | dev_dbg(dev, "count (%ld) beyond left bytes: %lld\n", count, size - off); | ~~^ | | | long int | %d vim +120 drivers/fpga/xrt/lib/subdev.c 390cff2f7a6222 Lizhi Hou 2021-04-27 96 390cff2f7a6222 Lizhi Hou 2021-04-27 97 static ssize_t metadata_output(struct file *filp, struct kobject *kobj, 390cff2f7a6222 Lizhi Hou 2021-04-27 98 struct bin_attribute *attr, char *buf, loff_t off, size_t count) 390cff2f7a6222 Lizhi Hou 2021-04-27 99 { 390cff2f7a6222 Lizhi Hou 2021-04-27 100 struct device *dev = kobj_to_dev(kobj); 390cff2f7a6222 Lizhi Hou 2021-04-27 101 struct xrt_device *xdev = to_xrt_dev(dev); 390cff2f7a6222 Lizhi Hou 2021-04-27 102 struct xrt_subdev_platdata *pdata = DEV_PDATA(xdev); 390cff2f7a6222 Lizhi Hou 2021-04-27 103 unsigned char *blob; 390cff2f7a6222 Lizhi Hou 2021-04-27 104 unsigned long size; 390cff2f7a6222 Lizhi Hou 2021-04-27 105 ssize_t ret = 0; 390cff2f7a6222 Lizhi Hou 2021-04-27 106 390cff2f7a6222 Lizhi Hou 2021-04-27 107 blob = pdata->xsp_dtb; 390cff2f7a6222 Lizhi Hou 2021-04-27 108 size = xrt_md_size(dev, blob); 390cff2f7a6222 Lizhi Hou 2021-04-27 109 if (size == XRT_MD_INVALID_LENGTH) { 390cff2f7a6222 Lizhi Hou 2021-04-27 110 ret = -EINVAL; 390cff2f7a6222 Lizhi Hou 2021-04-27 111 goto failed; 390cff2f7a6222 Lizhi Hou 2021-04-27 112 } 390cff2f7a6222 Lizhi Hou 2021-04-27 113 390cff2f7a6222 Lizhi Hou 2021-04-27 114 if (off >= size) { 390cff2f7a6222 Lizhi Hou 2021-04-27 115 dev_dbg(dev, "offset (%lld) beyond total size: %ld\n", off, size); 390cff2f7a6222 Lizhi Hou 2021-04-27 116 goto failed; 390cff2f7a6222 Lizhi Hou 2021-04-27 117 } 390cff2f7a6222 Lizhi Hou 2021-04-27 118 390cff2f7a6222 Lizhi Hou 2021-04-27 119 if (off + count > size) { 390cff2f7a6222 Lizhi Hou 2021-04-27 @120 dev_dbg(dev, "count (%ld) beyond left bytes: %lld\n", count, size - off); 390cff2f7a6222 Lizhi Hou 2021-04-27 121 count = size - off; 390cff2f7a6222 Lizhi Hou 2021-04-27 122 } 390cff2f7a6222 Lizhi Hou 2021-04-27 123 memcpy(buf, blob + off, count); 390cff2f7a6222 Lizhi Hou 2021-04-27 124 390cff2f7a6222 Lizhi Hou 2021-04-27 125 ret = count; 390cff2f7a6222 Lizhi Hou 2021-04-27 126 failed: 390cff2f7a6222 Lizhi Hou 2021-04-27 127 return ret; 390cff2f7a6222 Lizhi Hou 2021-04-27 128 } 390cff2f7a6222 Lizhi Hou 2021-04-27 129 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org