[linux-next:master 3561/4499] fs/nfsd/nfs4proc.c:1411:24: sparse: sparse: incorrect type in assignment (different base types)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   8dca2cd055ffb78b37f52f0bf0bd20c249619c4d
commit: ff78b94429268be1c7104f6c6bf7e51de1be91e0 [3561/4499] NFSD add vfs_fsync after async copy is done
config: mips-randconfig-s031-20210522 (attached as .config)
compiler: mips-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.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ff78b94429268be1c7104f6c6bf7e51de1be91e0
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout ff78b94429268be1c7104f6c6bf7e51de1be91e0
        # 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__' W=1 ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
   command-line: note: in included file:
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
   builtin:0:0: sparse: this was the original definition
   builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
   builtin:0:0: sparse: this was the original definition
>> fs/nfsd/nfs4proc.c:1411:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be32 [usertype] status @@     got int @@
   fs/nfsd/nfs4proc.c:1411:24: sparse:     expected restricted __be32 [usertype] status
   fs/nfsd/nfs4proc.c:1411:24: sparse:     got int

vim +1411 fs/nfsd/nfs4proc.c

  1383	
  1384	static ssize_t _nfsd_copy_file_range(struct nfsd4_copy *copy)
  1385	{
  1386		ssize_t bytes_copied = 0;
  1387		u64 bytes_total = copy->cp_count;
  1388		u64 src_pos = copy->cp_src_pos;
  1389		u64 dst_pos = copy->cp_dst_pos;
  1390		__be32 status;
  1391	
  1392		/* See RFC 7862 p.67: */
  1393		if (bytes_total == 0)
  1394			bytes_total = ULLONG_MAX;
  1395		do {
  1396			if (kthread_should_stop())
  1397				break;
  1398			bytes_copied = nfsd_copy_file_range(copy->nf_src->nf_file,
  1399					src_pos, copy->nf_dst->nf_file, dst_pos,
  1400					bytes_total);
  1401			if (bytes_copied <= 0)
  1402				break;
  1403			bytes_total -= bytes_copied;
  1404			copy->cp_res.wr_bytes_written += bytes_copied;
  1405			src_pos += bytes_copied;
  1406			dst_pos += bytes_copied;
  1407		} while (bytes_total > 0 && !copy->cp_synchronous);
  1408		/* for a non-zero asynchronous copy do a commit of data */
  1409		if (!copy->cp_synchronous && copy->cp_res.wr_bytes_written > 0) {
  1410			down_write(&copy->nf_dst->nf_rwsem);
> 1411			status = vfs_fsync_range(copy->nf_dst->nf_file,
  1412						 copy->cp_dst_pos,
  1413						 copy->cp_res.wr_bytes_written, 0);
  1414			up_write(&copy->nf_dst->nf_rwsem);
  1415			if (!status)
  1416				copy->committed = true;
  1417		}
  1418		return bytes_copied;
  1419	}
  1420	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux