* fs/nfsd/nfs4xdr.c:2004:9: warning: Identical condition 'status', second condition is always false
@ 2020-11-10 6:02 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-11-10 6:02 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3866 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Frank van der Linden <fllinden@amazon.com>
CC: Chuck Lever <chuck.lever@oracle.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 407ab579637ced6dc32cfb2295afb7259cca4b22
commit: 23e50fe3a5e6045a573c69d4b0e3d78aa6183323 nfsd: implement the xattr functions and en/decode logic
date: 4 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 4 months ago
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> fs/nfsd/nfs4xdr.c:2004:9: warning: Identical condition 'status', second condition is always false [identicalConditionAfterEarlyExit]
return status;
^
fs/nfsd/nfs4xdr.c:1996:6: note: first condition
if (status)
^
fs/nfsd/nfs4xdr.c:2004:9: note: second condition
return status;
^
fs/nfsd/nfs4xdr.c:1013:2: warning: Variable 'p' is reassigned a value before the old one has been used. 'break;' missing? [redundantAssignInSwitch]
READ_BUF(4);
^
fs/nfsd/nfs4xdr.c:991:4: note: Variable 'p' is reassigned a value before the old one has been used. 'break;' missing?
COPYMEM(open->op_verf.data, NFS4_VERIFIER_SIZE);
^
fs/nfsd/nfs4xdr.c:1013:2: note: Variable 'p' is reassigned a value before the old one has been used. 'break;' missing?
READ_BUF(4);
^
vim +/status +2004 fs/nfsd/nfs4xdr.c
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1981
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1982 /*
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1983 * A GETXATTR op request comes without a length specifier. We just set the
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1984 * maximum length for the reply based on XATTR_SIZE_MAX and the maximum
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1985 * channel reply size. nfsd_getxattr will probe the length of the xattr,
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1986 * check it against getxa_len, and allocate + return the value.
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1987 */
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1988 static __be32
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1989 nfsd4_decode_getxattr(struct nfsd4_compoundargs *argp,
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1990 struct nfsd4_getxattr *getxattr)
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1991 {
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1992 __be32 status;
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1993 u32 maxcount;
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1994
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1995 status = nfsd4_decode_xattr_name(argp, &getxattr->getxa_name);
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1996 if (status)
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1997 return status;
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1998
23e50fe3a5e6045 Frank van der Linden 2020-06-23 1999 maxcount = svc_max_payload(argp->rqstp);
23e50fe3a5e6045 Frank van der Linden 2020-06-23 2000 maxcount = min_t(u32, XATTR_SIZE_MAX, maxcount);
23e50fe3a5e6045 Frank van der Linden 2020-06-23 2001
23e50fe3a5e6045 Frank van der Linden 2020-06-23 2002 getxattr->getxa_len = maxcount;
23e50fe3a5e6045 Frank van der Linden 2020-06-23 2003
23e50fe3a5e6045 Frank van der Linden 2020-06-23 @2004 return status;
23e50fe3a5e6045 Frank van der Linden 2020-06-23 2005 }
23e50fe3a5e6045 Frank van der Linden 2020-06-23 2006
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-10 6:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-10 6:02 fs/nfsd/nfs4xdr.c:2004:9: warning: Identical condition 'status', second condition is always false 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.