tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 1ab75b2e415a29dba9aec94f203c6f88dbfc0ba0
commit: dbd4c2dd8f13ae40112081df5d9e19ff040f773d [3071/14582] NFSD add COPY_NOTIFY
operation
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-82-g68ac1bb-dirty
git checkout dbd4c2dd8f13ae40112081df5d9e19ff040f773d
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
> fs/nfsd/nfsd.h:410:24: sparse: sparse: incorrect type in return
expression (different base types) @@ expected unsigned int @@ got restricted
__be32unsigned int @@
> fs/nfsd/nfsd.h:410:24: sparse: expected unsigned int
> fs/nfsd/nfsd.h:410:24: sparse: got restricted __be32 [usertype]
> fs/nfsd/nfs4proc.c:1373:16: sparse: sparse: incorrect type in assignment (different
base types) @@ expected restricted __be32 [assigned] [usertype] status @@ got
[usertype] status @@
> fs/nfsd/nfs4proc.c:1373:16: sparse: expected restricted __be32 [assigned]
[usertype] status
> fs/nfsd/nfs4proc.c:1373:16: sparse: got unsigned int
vim +1373 fs/nfsd/nfs4proc.c
1340
1341 static __be32
1342 nfsd4_copy_notify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
1343 union nfsd4_op_u *u)
1344 {
1345 struct nfsd4_copy_notify *cn = &u->copy_notify;
1346 __be32 status;
1347 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
1348 struct nfs4_stid *stid;
1349 struct nfs4_cpntf_state *cps;
1350 struct nfs4_client *clp = cstate->clp;
1351
1352 status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh,
1353 &cn->cpn_src_stateid, RD_STATE, NULL,
1354 &stid);
1355 if (status)
1356 return status;
1357
1358 cn->cpn_sec = nn->nfsd4_lease;
1359 cn->cpn_nsec = 0;
1360
1361 status = nfserrno(-ENOMEM);
1362 cps = nfs4_alloc_init_cpntf_state(nn, stid);
1363 if (!cps)
1364 goto out;
1365 memcpy(&cn->cpn_cnr_stateid, &cps->cp_stateid.stid,
sizeof(stateid_t));
1366 memcpy(&cps->cp_p_stateid, &stid->sc_stateid, sizeof(stateid_t));
1367 memcpy(&cps->cp_p_clid, &clp->cl_clientid, sizeof(clientid_t));
1368
1369 /* For now, only return one server address in cpn_src, the
1370 * address used by the client to connect to this server.
1371 */
1372 cn->cpn_src.nl4_type = NL4_NETADDR;
1373 status = nfsd4_set_netaddr((struct sockaddr
*)&rqstp->rq_daddr,
1374 &cn->cpn_src.u.nl4_addr);
1375 WARN_ON_ONCE(status);
1376 if (status) {
1377 nfs4_put_cpntf_state(nn, cps);
1378 goto out;
1379 }
1380 out:
1381 nfs4_put_stid(stid);
1382 return status;
1383 }
1384
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation