All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: NeilBrown <neil@brown.name>
Cc: oe-kbuild-all@lists.linux.dev, Chuck Lever <cel@kernel.org>,
	Jeff Layton <jlayton@kernel.org>
Subject: [cel:nfsd-testing 199/222] fs/nfsd/nfs4proc.c:224:47: sparse: sparse: incorrect type in initializer (different base types)
Date: Fri, 31 Jul 2026 09:12:08 +0800	[thread overview]
Message-ID: <202607310858.MvSOuLmM-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux nfsd-testing
head:   67be65963a6470b667125cc648b56161ed3dfdce
commit: 5143cf703ab5386a0f67df40998acf5a882eabf2 [199/222] nfsd: separate out VFS-specific code from nfsd4_create_file()
config: m68k-randconfig-r122-20260730 (https://download.01.org/0day-ci/archive/20260731/202607310858.MvSOuLmM-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.4.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260731/202607310858.MvSOuLmM-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607310858.MvSOuLmM-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   fs/nfsd/nfs4proc.c:179:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be32 @@     got int @@
   fs/nfsd/nfs4proc.c:179:24: sparse:     expected restricted __be32
   fs/nfsd/nfs4proc.c:179:24: sparse:     got int
   fs/nfsd/nfs4proc.c:181:24: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be32 @@     got int @@
   fs/nfsd/nfs4proc.c:181:24: sparse:     expected restricted __be32
   fs/nfsd/nfs4proc.c:181:24: sparse:     got int
   fs/nfsd/nfs4proc.c:182:16: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __be32 @@     got int @@
   fs/nfsd/nfs4proc.c:182:16: sparse:     expected restricted __be32
   fs/nfsd/nfs4proc.c:182:16: sparse:     got int
>> fs/nfsd/nfs4proc.c:224:47: sparse: sparse: incorrect type in initializer (different base types) @@     expected int err @@     got restricted __be32 @@
   fs/nfsd/nfs4proc.c:224:47: sparse:     expected int err
   fs/nfsd/nfs4proc.c:224:47: sparse:     got restricted __be32
   fs/nfsd/nfs4proc.c:541:47: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected int errno @@     got restricted __be32 @@
   fs/nfsd/nfs4proc.c:541:47: sparse:     expected int errno
   fs/nfsd/nfs4proc.c:541:47: sparse:     got restricted __be32

vim +224 fs/nfsd/nfs4proc.c

   198	
   199	static struct file *do_lookup_open(struct path *parent,
   200					   struct qstr *name,
   201					   unsigned int oflags,
   202					   umode_t mode)
   203	{
   204		struct file *filp = NULL;
   205		struct path path;
   206		struct dentry *child;
   207		int want_write_err = 0;
   208	
   209		want_write_err = mnt_want_write(parent->mnt);
   210	
   211		child = start_creating(&nop_mnt_idmap, parent->dentry, name);
   212		if (IS_ERR(child)) {
   213			filp = ERR_CAST(child);
   214			goto out;
   215		}
   216		path.mnt = parent->mnt;
   217		path.dentry = child;
   218	
   219		if (d_really_is_positive(child)) {
   220			/*
   221			 * open the file so that we consistently have a valid
   222			 * op_filp and consequently a valid ->f_path.dentry.
   223			 */
 > 224			int err = nfsd_check_obj_isreg(child);
   225	
   226			if (err)
   227				filp = ERR_PTR(err);
   228			else
   229				filp = dentry_open(&path, oflags, current_cred());
   230		} else if (!(oflags & O_CREAT)) {
   231			filp = ERR_PTR(-ENOENT);
   232		} else if (want_write_err) {
   233			filp = ERR_PTR(want_write_err);
   234		} else {
   235			filp = dentry_create(&path, oflags, mode, current_cred());
   236			child = path.dentry;
   237		}
   238		end_creating(child);
   239	out:
   240		if (!want_write_err)
   241			mnt_drop_write(parent->mnt);
   242		return filp;
   243	}
   244	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-07-31  1:12 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 \
    --in-reply-to=202607310858.MvSOuLmM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cel@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=neil@brown.name \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.