All of lore.kernel.org
 help / color / mirror / Atom feed
* [cel:nfsd-xdr-stream 184/222] fs/nfsd/nfsxdr.c:659:40: sparse: sparse: incorrect type in argument 2 (different base types)
@ 2020-12-02  0:49 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-12-02  0:49 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2195 bytes --]

tree:   git://git.linux-nfs.org/projects/cel/cel-2.6.git nfsd-xdr-stream
head:   b7fc29ae80754e7f13221c012a2fd6e0203aa46e
commit: 49763242727b7fceda31964f6e046ea036594249 [184/222] NFSD: Update the NFSv2 READDIR entry encoder to use struct xdr_stream
config: x86_64-randconfig-s021-20201201 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-170-g3bc348f6-dirty
        git remote add cel git://git.linux-nfs.org/projects/cel/cel-2.6.git
        git fetch --no-tags cel nfsd-xdr-stream
        git checkout 49763242727b7fceda31964f6e046ea036594249
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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


"sparse warnings: (new ones prefixed by >>)"
>> fs/nfsd/nfsxdr.c:659:40: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] n @@     got restricted __be32 [usertype] @@
   fs/nfsd/nfsxdr.c:659:40: sparse:     expected unsigned int [usertype] n
   fs/nfsd/nfsxdr.c:659:40: sparse:     got restricted __be32 [usertype]

vim +659 fs/nfsd/nfsxdr.c

   641	
   642	static int
   643	svcxdr_encode_entry_common(struct nfsd_readdirres *resp, const char *name,
   644				   int namlen, loff_t offset, u64 ino)
   645	{
   646		struct xdr_buf *dirlist = &resp->dirlist;
   647		struct xdr_stream *xdr = &resp->xdr;
   648	
   649		if (xdr_stream_encode_item_present(xdr) < 0)
   650			return 0;
   651		/* fileid */
   652		if (xdr_stream_encode_u32(xdr, (u32)ino) < 0)
   653			return 0;
   654		/* name */
   655		if (xdr_stream_encode_opaque(xdr, name, min(namlen, NFS2_MAXNAMLEN)) < 0)
   656			return 0;
   657		/* cookie */
   658		resp->cookie_offset = dirlist->len;
 > 659		if (xdr_stream_encode_u32(xdr, cpu_to_be32(~0U)) < 0)
   660			return 0;
   661	
   662		return 1;
   663	}
   664	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33588 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-02  0:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02  0:49 [cel:nfsd-xdr-stream 184/222] fs/nfsd/nfsxdr.c:659:40: sparse: sparse: incorrect type in argument 2 (different base types) kernel test robot

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.