public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: David Howells <[email protected]>
Cc: [email protected],
	GNU/Weeb Mailing List <[email protected]>,
	[email protected]
Subject: [ammarfaizi2-block:dhowells/linux-fs/cifs-netfs 34/41] fs/cifs/smb2ops.c:3965:34: sparse: sparse: incorrect type in argument 2 (different base types)
Date: Wed, 1 Jun 2022 15:17:10 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/cifs-netfs
head:   1fc71b6b30f6d2a981c163b77c9aee0aecaecb29
commit: 4c67a0e88c041546f0a045d5034e045e0c404918 [34/41] cifs: Share server EOF pos with netfslib
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20220601/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-14-g5a0004b5-dirty
        # https://github.com/ammarfaizi2/linux-block/commit/4c67a0e88c041546f0a045d5034e045e0c404918
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/cifs-netfs
        git checkout 4c67a0e88c041546f0a045d5034e045e0c404918
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash fs/cifs/

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


sparse warnings: (new ones prefixed by >>)
>> fs/cifs/smb2ops.c:3965:34: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected long long [usertype] new_i_size @@     got restricted __le64 [addressable] [assigned] [usertype] eof @@
   fs/cifs/smb2ops.c:3965:34: sparse:     expected long long [usertype] new_i_size
   fs/cifs/smb2ops.c:3965:34: sparse:     got restricted __le64 [addressable] [assigned] [usertype] eof
>> fs/cifs/smb2ops.c:3966:33: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected long long [usertype] newsize @@     got restricted __le64 [addressable] [assigned] [usertype] eof @@
   fs/cifs/smb2ops.c:3966:33: sparse:     expected long long [usertype] newsize
   fs/cifs/smb2ops.c:3966:33: sparse:     got restricted __le64 [addressable] [assigned] [usertype] eof
>> fs/cifs/smb2ops.c:3967:57: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected long long [usertype] new_size @@     got restricted __le64 [addressable] [assigned] [usertype] eof @@
   fs/cifs/smb2ops.c:3967:57: sparse:     expected long long [usertype] new_size
   fs/cifs/smb2ops.c:3967:57: sparse:     got restricted __le64 [addressable] [assigned] [usertype] eof
   fs/cifs/smb2ops.c:4752:39: sparse: sparse: incompatible types in comparison expression (different type sizes):
   fs/cifs/smb2ops.c:4752:39: sparse:    unsigned int *
   fs/cifs/smb2ops.c:4752:39: sparse:    unsigned long *

vim +3965 fs/cifs/smb2ops.c

  3932	
  3933	static long smb3_collapse_range(struct file *file, struct cifs_tcon *tcon,
  3934				    loff_t off, loff_t len)
  3935	{
  3936		int rc;
  3937		unsigned int xid;
  3938		struct inode *inode;
  3939		struct cifsFileInfo *cfile = file->private_data;
  3940		__le64 eof;
  3941	
  3942		xid = get_xid();
  3943	
  3944		inode = d_inode(cfile->dentry);
  3945	
  3946		if (off >= i_size_read(inode) ||
  3947		    off + len >= i_size_read(inode)) {
  3948			rc = -EINVAL;
  3949			goto out;
  3950		}
  3951	
  3952		rc = smb2_copychunk_range(xid, cfile, cfile, off + len,
  3953					  i_size_read(inode) - off - len, off);
  3954		if (rc < 0)
  3955			goto out;
  3956	
  3957		eof = cpu_to_le64(i_size_read(inode) - len);
  3958		rc = SMB2_set_eof(xid, tcon, cfile->fid.persistent_fid,
  3959				  cfile->fid.volatile_fid, cfile->pid, &eof);
  3960		if (rc < 0)
  3961			goto out;
  3962	
  3963		rc = 0;
  3964	
> 3965		netfs_resize_file(inode, eof);
> 3966		truncate_setsize(inode, eof);
> 3967		fscache_resize_cookie(cifs_inode_cookie(inode), eof);
  3968	 out:
  3969		free_xid(xid);
  3970		return rc;
  3971	}
  3972	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-06-01  7:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox