Hi Tetsuo,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.3-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Tetsuo-Handa/dev-kmem-Debug-preadv-progress/20190813-044328
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.4.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <[email protected]>

All warnings (new ones prefixed by >>):

   fs/read_write.c: In function 'do_loop_readv_writev':
>> fs/read_write.c:715:48: warning: format '%ld' expects argument of type 'long 
>> int', but argument 2 has type 'size_t {aka unsigned int}' [-Wformat=]
       printk("do_loop_readv_writev: iter->count=%ld iovec.iov_len=%ld\n", 
iter->count, iovec.iov_len);
                                                 ~~^                       
~~~~~~~~~~~
                                                 %d
>> fs/read_write.c:715:66: warning: format '%ld' expects argument of type 'long 
>> int', but argument 3 has type '__kernel_size_t {aka unsigned int}' 
>> [-Wformat=]
       printk("do_loop_readv_writev: iter->count=%ld iovec.iov_len=%ld\n", 
iter->count, iovec.iov_len);
                                                                   ~~^          
        ~~~~~~~~~~~~~
                                                                   %d
>> fs/read_write.c:725:39: warning: format '%ld' expects argument of type 'long 
>> int', but argument 2 has type 'ssize_t {aka int}' [-Wformat=]
       printk("do_loop_readv_writev: nr=%ld\n", nr);
                                        ~~^
                                        %d

vim +715 fs/read_write.c

   699  
   700  /* Do it by hand, with file-ops */
   701  static ssize_t do_loop_readv_writev(struct file *filp, struct iov_iter 
*iter,
   702                  loff_t *ppos, int type, rwf_t flags)
   703  {
   704          ssize_t ret = 0;
   705  
   706          if (flags & ~RWF_HIPRI)
   707                  return -EOPNOTSUPP;
   708  
   709          while (iov_iter_count(iter)) {
   710                  struct iovec iovec = iov_iter_iovec(iter);
   711                  ssize_t nr;
   712  
   713                  if (IS_ENABLED(CONFIG_DEBUG_AID_FOR_SYZBOT) &&
   714                      fatal_signal_pending(current))
 > 715                          printk("do_loop_readv_writev: iter->count=%ld 
 > iovec.iov_len=%ld\n", iter->count, iovec.iov_len);
   716                  if (type == READ) {
   717                          nr = filp->f_op->read(filp, iovec.iov_base,
   718                                                iovec.iov_len, ppos);
   719                  } else {
   720                          nr = filp->f_op->write(filp, iovec.iov_base,
   721                                                 iovec.iov_len, ppos);
   722                  }
   723                  if (IS_ENABLED(CONFIG_DEBUG_AID_FOR_SYZBOT) &&
   724                      fatal_signal_pending(current))
 > 725                          printk("do_loop_readv_writev: nr=%ld\n", nr);
   726  
   727                  if (nr < 0) {
   728                          if (!ret)
   729                                  ret = nr;
   730                          break;
   731                  }
   732                  ret += nr;
   733                  if (nr != iovec.iov_len)
   734                          break;
   735                  iov_iter_advance(iter, nr);
   736          }
   737  
   738          return ret;
   739  }
   740  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to